Search code examples
javascriptjqueryhtmlhtmlspecialchars

How to convert html special chars to ordinary HTML?


Possible Duplicate:
How to decode HTML entities using jQuery?
HtmlSpecialChars equivalent in Javascript?

I need to convert with escaped htmlspecialchars to a valid HTML code, for example:

<p>Text here</p>

should be displayed in the browser like

Text here

What is the right way to do that?

Thanks in advance, Ivan.


Solution

  • How to decode HTML entities using jQuery? and jQuery .appendTo method worked for me.