How to escape quotes in a string literal inside an event handler attribute?
I'm outputting values from a database (it isn't really open to public entry, but it is open to entry by a user at the company -- meaning, I'm not worried about XSS). I'm trying to output a tag like this: <a href="" onclick="DoEdit('DESCRIPTION');">Click Me</a> DESCRIPTION is actually a value from the database that is something like this: Prelim Assess "Mini" Report I've tried replacing " with \", but no matter what I try, Firefox keeps chopping off my JavaScript call after the space after the word Assess, and it is causing all sorts of issues. I must be missing the obvious answer, but for the
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.