Closed spinlock99 closed 8 years ago
If I bind to the variable message in a template:
message
//template.hbs {{message}} //component.js message: "line one<br>line two"
message will be escaped and the <br> tag will not cause a line break. However, if the variable is a SafeString, it is still escaped:
<br>
//component.js message: Ember.String.htmlSafe("line one<br>line two")
Could you please provide a demo/reproduction?
OK, I'm an idiot. I was trying to compose multiple htmlSafe strings and pass that as message. If I compose the string then call htmlSafe it works.
htmlSafe
Thanks.
If I bind to the variable
message
in a template:message
will be escaped and the<br>
tag will not cause a line break. However, if the variable is a SafeString, it is still escaped: