I am getting data through php via <a onmouseup="fnc('needs_to_be_escaped_var')"></a> I've been trying to escape it in php but it isn't working. I was wondering if there was a way to escape it in javascript? Thanks. (I need to escape out single and double quotes for outputing into an html div)
easiest way: use escape(charstring) method, or encodeURI( URIString ) or encodeURIComponent( encodedURIString )