Encode and decode HTML entities. Protect against XSS.
HTML encoding converts special characters to HTML entities. Essential for displaying user-generated content safely. It helps prevent XSS attacks by ensuring that HTML reserved characters are properly escaped.
Common encodings: & → &, < → <, > → >, " → "