HTML Escaping Removed, Creating XSS Vulnerability
After Cursor refactored your template rendering code, HTML escaping was removed or disabled. User input is now rendered as HTML instead of being escaped, creating an XSS vulnerability.
Any user-supplied content could run malicious scripts.
Error Messages You Might See
Common Causes
- HTML escaping disabled with dangerouslySetInnerHTML or v-html
- innerHTML used instead of textContent
- Template escaping turned off
- User input rendered without sanitization
- Third-party HTML inserted without validation
How to Fix It
Always escape user input in templates. React escapes by default (good). Never use dangerouslySetInnerHTML with user data. Sanitize with DOMPurify if HTML needed. Use Content Security Policy header. Validate and filter input server-side.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
How do I safely render user HTML?
Sanitize with DOMPurify: DOMPurify.sanitize(userHtml). Removes dangerous tags/attributes. Better than escaping.
What's Content Security Policy?
HTTP header that restricts script sources. Prevents inline scripts, external scripts not from whitelist. Protects against XSS.