Does anyone know how and if it's possible to convert a
string like:
<div><a href="http://www.cnn.com">ww w.cnn.com</a></div>
<div>test string</div>
to something like this:
"\u003cdiv\u003 e\u003ca href=\u0022http ://www.cnn.com\u00 22
\u003ewww.cnn.c om\u003c/a\u003e\u003c/div\u003e\r\n\u 003cdi
v\u003etest string\u003c/div\u003e"
I would like to do this using some kind of encoding
without having to escape each special character if possible
Any suggestions is greatly appreciated.
Thanks
string like:
<div><a href="http://www.cnn.com">ww w.cnn.com</a></div>
<div>test string</div>
to something like this:
"\u003cdiv\u003 e\u003ca href=\u0022http ://www.cnn.com\u00 22
\u003ewww.cnn.c om\u003c/a\u003e\u003c/div\u003e\r\n\u 003cdi
v\u003etest string\u003c/div\u003e"
I would like to do this using some kind of encoding
without having to escape each special character if possible
Any suggestions is greatly appreciated.
Thanks
Comment