Opened 13 years ago
Last modified 12 years ago
#8953 closed defect
Absolute href are broken if trac is installed in root path — at Initial Version
Reported by: | anonymous | Owned by: | Catalin BALAN |
---|---|---|---|
Priority: | normal | Component: | MenusPlugin |
Severity: | normal | Keywords: | href |
Cc: | Trac Release: | 0.12 |
Description
Hi,
If an absolute href is broken trac is installed at root of the domain.
For exemple, if you install your trac at http://trac.myproject.org/ and configure
[mainnav] wiki.href = /wiki/Home
then TracMenus generates href 'wiki/Home'. This broke the link. (wiki is a netloc).
The offending code is : http://trac-hacks.org/browser/menusplugin/0.11/tracmenus/web_ui.py#L139
menu[name]['label']=menu[name].setdefault('label', html.a())(href=value.startswith('/') and req.href()+value or value)
reg.href()
returns '/'. You should trim beginning '' in the resulting href
.
Regards, Étienne
Note: See
TracTickets for help on using
tickets.