forum

Home / DeveloperSection / Forums / Convert special characters to HTML in Javascript

Convert special characters to HTML in Javascript

Anonymous User293203-Sep-2013

Does any one know how to convert special characters to HTML in Javascript?

Example:

'&' (ampersand) becomes '&amp' 
'"' (double quote) becomes '&quot' when ENT_NOQUOTES is not set.
''' (single quote) becomes '&#039' only when ENT_QUOTES is set.
'<' (less than) becomes '&lt'
'>' (greater than) becomes '&gt'

Thanks in advance.


Updated on 03-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By