Show code on a web page or put text into HTML attributes safely by escaping the characters HTML treats specially.
Questions
Which characters must be escaped?
At minimum & and <. Inside attributes, also " or '.
Convert special characters to HTML entities (&lt; &amp;) and decode entities back to text.
Show code on a web page or put text into HTML attributes safely by escaping the characters HTML treats specially.
At minimum & and <. Inside attributes, also " or '.