Monthly Archives: July 2012

Escaping single and double quotes in JavaScript onclick event handler

The simple code block below results in a javascript error if ${photoCaption} contains single or double quotes. So I thought that It needs to be Javascript escaped. I used escapeJavaScript method of org.apache.commons.lang.StringEscapeUtils class. First I inserted the code below … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment