Is there a built-in jQuery function for encoding a string as HTML?
Posted
by Ben McCormack
on Stack Overflow
See other posts from Stack Overflow
or by Ben McCormack
Published on 2010-04-29T21:39:43Z
Indexed on
2010/04/29
21:47 UTC
Read the original article
Hit count: 538
Is there a built-in jQuery function for encoding a string as HTML?
I'm trying to take the text a user types into a text box and then put that text into a different area of the page. My plan was to take the .val()
from the text box and supply that to the .html()
of the <div>
element. Perhaps there's a good jQuery plugin to help with this (if it's not built-in) or a better way overall to accomplish this goal.
© Stack Overflow or respective owner