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
Single quote in URLs
you don't need the single quote in the query trying, but, what i have found is this:
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.
Code: Select all
,"CNN","http://www.cnn.com",,"you\'ll file helpful news here",0
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.