How can I convert special characters to HTML in JavaScript?
Example:
&(ampersand) becomes&."(double quote) becomes"whenENT_NOQUOTESis not set.'(single quote) becomes'only whenENT_QUOTESis set.<(less than) becomes<.>(greater than) becomes>.
You need a function that does something like
But taking into account your desire for different handling of single/double quotes.