jQuery-Litelighter icon indicating copy to clipboard operation
jQuery-Litelighter copied to clipboard

Can't render HTML text

Open heaversm opened this issue 12 years ago • 2 comments

Hi - HTML code does not render proper html tags, only the contents of those tags.

for example <div>Hi</div> just renders as `Hi``

I've made sure to set the lllanguage attribute to html.

heaversm avatar Jul 02 '13 12:07 heaversm

The browser is going to render this, it won't be text. These need to be escaped just as if you're displaying plain text code in a pre tag. So rule of thumb is if it displays properly without litelighter with pre or code tag it should be good to go. So you should have &lt;div&gt;Hi&lt;/div&gt;

trentrichardson avatar Jul 02 '13 13:07 trentrichardson

Ah, thanks!

heaversm avatar Jul 03 '13 01:07 heaversm