encode
Entities
HTML entity encode and decode, with a named-vs-numeric switch.
The five that always matter in HTML are & < > " '. Escaping more than that is only needed when the document's encoding is not UTF-8, which in 2026 it is.
encode
HTML entity encode and decode, with a named-vs-numeric switch.
The five that always matter in HTML are & < > " '. Escaping more than that is only needed when the document's encoding is not UTF-8, which in 2026 it is.