Convert characters to HTML entities or decode entity references back to text. Named, decimal, hexadecimal, and minimal-safe modes are supported, and decoded output is displayed as text rather than executed as HTML.
Strict decoding reports malformed references; forgiving mode follows the selected library behavior. Decoded text is never inserted as executable HTML.