Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show property which includes html tags

I've an ember property which includes html tags (<br />, <strong>, <p>, <span>, and similar stuff).

How can i tell ember not to escape this text? Is there any default Handlebars helper from ember, or need I to write my own?

like image 644
Lux Avatar asked Jul 12 '12 11:07

Lux


People also ask

How do you show tags in HTML?

You can show HTML tags as plain text in HTML on a website or webpage by replacing < with &lt; or &60; and > with &gt; or &62; on each HTML tag that you want to be visible. Ordinarily, HTML tags are not visible to the reader on the browser. They are there but you cannot see them.

What are tags HTML?

An HTML tag is a piece of markup language used to indicate the beginning and end of an HTML element in an HTML document. As part of an HTML element, HTML tags help web browsers convert HTML documents into web pages.


1 Answers

From http://handlebarsjs.com/

Handlebars HTML-escapes values returned by a {{expression}}.
If you don't want Handlebars to escape a value, use the "triple-stash".

{{{expression}}}

like image 164
Rajat Avatar answered Sep 21 '22 00:09

Rajat