[PATCH] Invalid links when trac is on accessed from top-most path
|Reported by:||HumanInternals||Owned by:||Catalin BALAN|
The links in that ticket were considered as being spam, so I added
\notspam\ to prevent that from happening. Ignore it.
My Trac installation is accessed via http://trac.kelso/. When I add a menu, like that:
query = enabled query.href = /query query.label = Custom Query query.order = 1 query.parent = tickets
It's being rendered as
<a \notspam\ href="//query">Custom Query</a>. The
// at the beginning of the href causes Chrome and Firefox (and possibly others) to think its a link to "http://query/".
When I remove the
/ prefix from the href in the configuration, the link becomes
<a \notspam\ href="query">Custom Query</a>, which doesn't work when I'm on a URL like 'http://trac.kelso/ticket/123', as the link is pointing to 'http:
It works fine when Trac is installed under a sub directory, such as
http://trac.kelso/humaninternals/, as the link is rendered as
<a \notspam\ href="/humaninternals/query">Custom Query</a>. The issue is when its rendered with two slashes at the beginning.
Change History (14)
comment:1 Changed 6 years ago by
|Summary:||Invalid links when trac is on accessed from top-most path → [PATCH] Invalid links when trac is on accessed from top-most path|