Semicolons in URLs

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
bobbitt
Advanced
Advanced
Posts: 17
Joined: Thu Mar 12, 2009 4:43 pm

Semicolons in URLs

Post by bobbitt »

Hi all,

I've hit a minor snag with the DHTML menu. Some of the URLs I want to use have a ; in them, which of course causes the menu to think a new attribute is being passed in. I found the solution and wanted to post in in case others are also struggling with this. Simply replace the ; with %3B in the URL.

So for example:

http://Domain.com/forums/index.php?action=pm;sa=send

becomes:

http://Domain.com/forums/index.php?action=pm%3Bsa=send

Hope that helps

Cheers
Mike
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: Semicolons in URLs

Post by Andy »

Hi Mike,

Thanks for your post.

There is another way, just surround the url in backquotes, like this:

aI("text=test;url=`http://Domain.com/forums/index.php?action=pm;sa=send`");

This way the menu will know not to parse the semi colon in the url

-- Andy
bobbitt
Advanced
Advanced
Posts: 17
Joined: Thu Mar 12, 2009 4:43 pm

Re: Semicolons in URLs

Post by bobbitt »

Good to know, thanks Andy!
Post Reply