Hi, what is the best way to "sanitize" HTML for editing in a text area, then "unsanitizing" it? I have an HTML page I want to edit in a textarea, and I don't know the safest way to do so.
Should I use h(), if so, is there an... unh() type method.
| SitePoint Sponsor |



Hi, what is the best way to "sanitize" HTML for editing in a text area, then "unsanitizing" it? I have an HTML page I want to edit in a textarea, and I don't know the safest way to do so.
Should I use h(), if so, is there an... unh() type method.





Does one need to unsanitize in a text area?
<textarea><%=h '</textarea>' %></textarea>
The browser kind of natually unsanitizes it and on the following post you'd have pure html to resanitize.
Am I missing the point?
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?



I thought so. Okay thanks a lot, that was perfect![]()
Bookmarks