Single quote in URLs

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
blimey
Advanced
Advanced
Posts: 17
Joined: Mon Jun 10, 2002 1:16 pm

Single quote in URLs

Post by blimey »

Having a single in your URL will cause mmenu.js to error.

Simple to reproduce, just take the menu_array.js from the standard menu.zip and change:
,"CNN","http://www.cnn.com",,,0

to:
,"CNN","http://www.cnn.com?hello='world'",,,0
poliguin
Beginner
Beginner
Posts: 2
Joined: Fri Oct 18, 2002 4:38 pm

Post by poliguin »

you don't need the single quote in the query trying, but, what i have found is this:

Code: Select all

,"CNN","http://www.cnn.com",,"you\'ll file helpful news here",0
will at least not throw the error that you might normally run across, but the option will no longer work as a link. why this happens i would love to know. replacing a ' with a \' will normally fix the errors, but in this case, it does not.

the only workaround i've found is to replace single quotes with curly quotes (`) and a regex doesn't work with replacing in the array or with in the mmenu.js file.
Post Reply