There's a bit of code here which will enlarge an image (in a pop-out) when you move your mouse over it. However, if the image path or file name contains an apostrophe, the code breaks. Can anyone help fix this?
You may have to run the image path/name through a function that url encodes the text before inserting it into the JavaScript (assuming the JavaScript is generated by some ASP... can't get to the site from work.)
You could change the JavaScript to use double quotes around the value, but you would run into the same problem if there was a double quote in the path/name. Better to take the time now and work on a more complete solution.
Yes, the script is called via ASP. I've tried replacing it with an escape-apostrophe, with a pair of them, and with an ascii value; none had any effect.
Another reply to an ancient topic. I solved this issue by replacing any apostrophe with the Unicode "Prime" character (looks just like an apostrophe) and Javascript is fine with it.