I have some server side code in PHP
which looks like this
$var2 = htmlspecialchars($var1);
For example,
"It's Monday" gets converted to "It's Monday"
I am not able to decode the text back in javascript using the function unescape.
unescape("It's Monday") // returns "It's Monday"
How can i decode this in javascript to get the original string back, apart from using replace (because this way i'd have to manually handle all special cases) ?