This example shows how to use htmlencode/decode for xml which is escaped with < for < and > for > etc. The trick is very straightforward: just paste the text in an element and read it back in as text or innerHTML, which will let the browser do the heavy lifting for you.
This page will remain online for future reference. The original question can be viewed at Experts-Exchange, but requires (free) membership. More information about me, about how this site is maintained and about how to use these pages for yourself, check out the opening page.
| encoded | decoded | |
|---|---|---|
|
|