Skip to main content

One doc tagged with "innerhtml"

View all tags

XSS Basics: Cross-Site Scripting

Learn what cross-site scripting (XSS) is, the three types, why it happens, and how to prevent it: escape output for the right context, use safe DOM methods, validate links, sanitise when HTML is allowed, and add a CSP. Includes a context escaping lab and a safe-or-unsafe quiz.