How do I use jQuery to decode HTML entities in a string?
I think you're confusing the text and HTML methods. Look at this example, if you use an element's inner HTML as text, you'll get decoded HTML tags (second button). But if you use them as HTML, you'll get the HTML formatted view (first button).
here is a HTML content.
Results here !
First button writes : here is a HTML content.
Second button writes : here is a HTML content.
By the way, you can see a plug-in that I found in jQuery plugin - HTML decode and encode that encodes and decodes HTML strings.