-
[RESOLVED] Escape Character Question
I have a string that is being concatenated as such
site_address = site_address.replace("'", "\'");
site_name = site_name.replace("'", "\'");
htmlOutput= htmlOutput +"<a href = \'javascript:helperFuncs.panZoomToFeature(\"" + site_name + "\",\"" + site_address + "\",\"" + "\");\'>" + site_name + "</a>";
The problem is the single quotes are not getting escaped. I tried a regex and that didn't work either.
Does anyone know what is going on here?
Thanks
-
I guess I solved my own problem. Had to use this instead:
site_name = site_name.replace("'", "%27");
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks