Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:27

Single quote in URLs


Poster: blimey
Dated: Monday August 19 2002 - 13:13:14 BST

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


Poster: poliguin
Dated: Friday October 18 2002 - 16:56:44 BST

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

Code:
,"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.