tofutim tofutim - 1 year ago 145
Node.js Question

Rendering HTML in variable using Jade

I have some text stored in a variable which contains some HTML. For example, the cat in the hat. However, when I render it in Jade, it shows up with the tags instead of rendering the formatting. How can I fix this?

Answer Source

Code buffered by = is escaped by default for security, however to output unescaped return values you may use !=

p!= aVarContainingHTML

Jade Doc

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download