]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/tag.pm
tag: Normalize tagbase so leading/trailing slashes in it don't break things.
[ikiwiki.git] / IkiWiki / Plugin / tag.pm
index c4a1756779126c53a265f9e40c82dcdc97c7a52c..7977bbcf567887e63a66f8487bf327cdf5419e0c 100644 (file)
@@ -44,6 +44,7 @@ sub tagpage ($) { #{{{
        if ($tag !~ m{^\.?/} &&
            defined $config{tagbase}) {
                $tag="/".$config{tagbase}."/".$tag;
        if ($tag !~ m{^\.?/} &&
            defined $config{tagbase}) {
                $tag="/".$config{tagbase}."/".$tag;
+               $tag=~y#/#/#s; # squash dups
        }
 
        return $tag;
        }
 
        return $tag;