Sunday, October 20, 2013

Escaping double quotes within inline javascript

When we need to escape double quotes while specifying javascript for a event handler:

http://stackoverflow.com/questions/1081573/escaping-double-quotes-in-javascript-onclick-event-handler
It needs to be HTML-escaped, not Javascript-escaped. Change \" to ".

No comments:

Post a Comment

Followers

Blog Archive