tag: Normalize tagbase so leading/trailing slashes in it don't break things.

master
Joey Hess 2008-11-10 19:48:58 -05:00
parent 81a87988c4
commit f8a09ba105
2 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ sub tagpage ($) { #{{{
if ($tag !~ m{^\.?/} && if ($tag !~ m{^\.?/} &&
defined $config{tagbase}) { defined $config{tagbase}) {
$tag="/".$config{tagbase}."/".$tag; $tag="/".$config{tagbase}."/".$tag;
$tag=~y#/#/#s; # squash dups
} }
return $tag; return $tag;

2
debian/changelog vendored
View File

@ -11,6 +11,8 @@ ikiwiki (2.69) UNRELEASED; urgency=low
absolute. absolute.
* Add rel=nofollow to recentchanges_links for the same (weak) reasons it * Add rel=nofollow to recentchanges_links for the same (weak) reasons it
was earlier added to edit links. was earlier added to edit links.
* tag: Normalize tagbase so leading/trailing slashes in it don't break
things.
-- Joey Hess <joeyh@debian.org> Thu, 06 Nov 2008 16:01:00 -0500 -- Joey Hess <joeyh@debian.org> Thu, 06 Nov 2008 16:01:00 -0500