Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- Create a node containing a named anchor (e.g. <a name='top'></a>)
- Create a menu item with a relative URL and the named anchor (e.g. node/1#top)
- Browse to a page that contains the menu link and click it.
- The correct page will load, but the browser does not scroll to the anchor.
- The URL in the title bar (and in the page source) contains %23 where there should be a #.
The # character in the URL should not be encoded. I'd guess that somewhere in the code, there is an indirect call to urlencode() that doesn't account for the possibility of a named anchor in the menu item URL.
Comment | File | Size | Author |
---|---|---|---|
#3 | common.inc_26.patch | 439 bytes | Creazion |
Comments
Comment #1
subakva CreditAttribution: subakva commentedSee this support request for another example of someone with the same problem.
You can use an absolute URL to workaround for this problem.
Comment #2
Creazion CreditAttribution: Creazion commentedHi,
there is a solution for the problem.
The drupal_urlencode function should look like this:
instead of this:
Comment #3
Creazion CreditAttribution: Creazion commentedHere is the patch for my solution. Hope it will help.
Comment #4
drummhttp://drupal.org/node/68886
Comment #5
NaX CreditAttribution: NaX commentedlook here for possible menu system patch http://drupal.org/node/90570