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	cbalan	Hi,\r\n\r\nIf an absolute href is broken trac is installed at root of the domain.\r\n\r\nFor exemple, if you install your trac at `http://trac.myproject.org/` and configure\r\n\r\n{{{\r\n#!ini\r\n[mainnav]\r\nwiki.href = /wiki/Home\r\n}}}\r\n\r\nthen !TracMenus generates href '//wiki/Home'. This broke the link. (wiki is a netloc).\r\n\r\nThe offending code is : http://trac-hacks.org/browser/menusplugin/0.11/tracmenus/web_ui.py#L139\r\n\r\n{{{\r\n#!python\r\nmenu[name]['label']=menu[name].setdefault('label', html.a())(href=value.startswith('/') and req.href()+value or value)\r\n}}}\r\n\r\n`reg.href()` returns '/'. You should trim beginning '//' in the resulting `href`.\r\n\r\n\r\nRegards,\r\nÉtienne\r\n\r\n	defect	closed	normal	MenusPlugin	normal	duplicate	href		0.12
