Earlier quoted context omitted.
The libraries people use to "escape all inputs, etc" are providing effectively the same functionality as CSP is, but that's not my real concern. My real concern is, despite the fact that developers have the ability to set policies about what regions on the page can contain dynamic content, "policy" is generally too brittle to describe what people need to put on pages in real-world apps.
The libraries people use to "escape all inputs, etc" are providing effectively the same functionality as CSP is Maybe, but not everyone's using those libraries, and those libraries may themselves have bugs or may be used incorrectly. Defense-in-depth, and all that. "policy" is generally too brittle to describe what people need to put on pages in real-world apps Just reading through the spec I linked to, I don't see w…
Brittleness: CSP disables tags and all the script element attributes. Almost every major website in the world uses these in some form today. Both CSP and "anti-XSS" features do server-side policy about what parts of a page can have scripts, but the "anti-XSS" features are far more flexible.