EXERCISE 3 — Encoding vs sanitization: pick the right tool =========================================================== THE DISTINCTION: - ENCODING: transforms data so it displays LITERALLY as text; no markup the user supplied is functional. Use when the value should be SHOWN AS TEXT. - SANITIZATION: parses HTML and REMOVES dangerous parts while KEEPING an allowlisted subset of safe markup functional. Use when the value is meant to BE HTML (rich text). Default to ENCODING; reach for SANITIZATION only when you must render user-provided HTML. (a) Display a user's chosen display-name. USE: ENCODING (HTML entity / attribute, per context). WHY: a display name is TEXT. It should never contain functional markup. Encoding shows whatever they typed literally and makes any