html entities xml text()
html entities xml text()
Hello,
I have an XML file and it contains this text:
-
sdfasdf :) asdfa <script>alert('asdf');</script> <hr /> :):)
As you can see i have replaced <, >, with the UTF-8 code.
Now when i use this code:
-
var message = $(this).text();
Suddenly all the HTML entities are decoded,
So < = < and > = >
I just want it to stay > and <
Can somebody please help me out.
Thank you very much!