Apostrophe problems

Hi all,


I was just wondering if there are anyone else how have experienced problems using apostrophes in menu items? My problems is that when someone adds a menu item with an apostrophe the whole menu disappears. I would imagine that it might be because of some conflicting start ' and end ' tags.



Is this a bug or just a scripting error?



The menu system used is:

<!-- spacemenu v1.0 dropdown menu for mysource matrix -->

<!-- based on JSCookMenu v1.0.1 by Heng Yuan -->





Cheers,

Karl

I would guess that you're right – Matrix doesn't escape the ' characters when it replaces keywords, so it could be conflicting with the JavaScript you've chosen to use for the menu.

Yep, the JavaScript is expecting 'Karl\'s Menu Item', rather than 'Karl's Menu Item'.


You could modified the script so that every instance of the menu item does this:


    MatrixOutputName.replace("'","\'))


but the code looks like it would have to be reworked a little.

Thanks for that.


Will have a look into the replace function mentioned.



Cheers guys

Sorry, the code should be:

    MatrixOutputName.replace("'","\'")