Skip to content

Tag: escaping

Escaping quotes in Javascript variable from Classic ASP

How can I escape quotes using a Classic ASP variable in javascript/jQuery? The ASP variable is taken from a DB. I’m using: But obviously that appears as when the page loads, which breaks the function with unexpected identifier. edit: I’m using using jQuery not “how can I achieve this using jQuery” sorry wasn’t clear. Any ideas? Thanks Answer You’ve asked

Single quotes in string with jQuery ajax

I have run into a problem where the user enters data and if there are single quotes at all, the script errors out. What’s the best way to handle single quotes that users enter so it doesn’t interfere with the jquery/javascript? UPDATE: I’m sending it through ajax to a database. here is the data parameter […]