$line=htmlentities(stripslashes($line));
This is the normal PHP statement. Can anyone tell me the Syntax in javascript to perform the above task through javascript??
$line=htmlentities(stripslashes($line));
This is the normal PHP statement. Can anyone tell me the Syntax in javascript to perform the above task through javascript??
There is a library for this. It has an equivalent to PHP htmlentities function: http://phpjs.org/functions/htmlentities/