Showing posts from August, 2010

How to Escape Single Quotes Within JavaScript

While I was trying to register a JavaScript code into an ASP.NET page I came across the need to ensure that passing a string to the JavaScript method would not cause an error ‘Unterminated string constant error’ upon rendering, this error could be caused if the string contains single quotes. In this post, I will discuss the issue related to escaping single or double quotes in JavaScript strings (JavaScript Escape Quotes) and I will propose some workarounds to avoid the error caused by this issue.  In t…

That is All