EXERCISE 3 — Walking the decision flow for three features ========================================================== THE FLOW: 1. Needs to render as HTML? No -> ENCODE (done). 2. Yes -> can you use Markdown/structured format instead of raw HTML? Prefer it. 3. Must accept HTML -> SANITIZE (DOMPurify, narrow allowlist, kept updated). 4. Independently -> VALIDATE strict-format fields; layer CSP under everything. (a) A username shown on a profile. VALUE TYPE: TEXT (a name is not markup). DECISION: ENCODE on output (HTML body / attribute per context). WHY: it should display literally; never render tags. No HTML needed, so step 1 short-circuits to encoding.