﻿id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
8953,Absolute href are broken if trac is installed in root path,anonymous,Catalin BALAN,"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

{{{
#!ini
[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

{{{
#!python
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

",defect,new,normal,MenusPlugin,normal,,href,,0.12
