XSS Mistakes in Single-Page Apps and How to Fix Them

Single-page apps make XSS easier to hide. You load one shell, fetch data later, stitch UI together in the browser, and somewhere along the way somebody says, “It’s fine, the framework escapes it.” Sometimes that’s true. Sometimes it’s very, very false. I’ve seen teams assume that moving from server-rendered templates to React or Vue magically solves XSS. It doesn’t. SPAs change where the bug happens, not whether it can happen. ...

July 14, 2026 · 8 min · headertest.com

XSS Prevention in Angular: A Real-World Before and After

Angular gives you better XSS defaults than most frontend frameworks. That’s the good news. The bad news: teams still break those protections all the time. I’ve seen this happen in real apps that started out safe, then picked up “just one quick workaround” for rich text, embeds, markdown, or dynamic links. A few months later, the app is full of bypassSecurityTrustHtml, direct innerHTML writes, and helper pipes that quietly turn untrusted input into executable code. ...

May 21, 2026 · 7 min · headertest.com