By 12stringblues on
Hello,
I have some menu items that link to "a href="/page#section". When I hover over them in the menu the url that shows at the bottom of the browser is correct - http://host/page#section but when I click on them the # is converted to %23 somehow and I get http://host/page%23section which doesn't work.
How can I stop this behavior - escape the # in the menu?, put some other ascii code for # in?
Thanks.
Comments
I should add this doesn't
I should add this doesn't happen if you use an absolute url in the menu item - so http://host/page#section . Only if you use page#section - perhaps this is a bug?
Have you found a solution?
Have a you found a solution for this problem? I've been looking into it, and it seems that the PHP urlencode() function changes # into %23. I'm guessing that menu URLs are sent through that function for some reason. I'm not sure what needs to change to make this work correctly. I can change the menu items to absolute URLs, but that's a pretty lame hack. I think this should be reported as a bug.
Created an Issue
I created an issue for this problem. See: http://drupal.org/node/72812