sub tagpage ($) { #{{{
my $tag=shift;
- if (exists $config{tagbase} &&
+ if ($tag !~ m{^\.?/} &&
+ exists $config{tagbase} &&
defined $config{tagbase}) {
$tag=$config{tagbase}."/".$tag;
}
if (/(.*)\|(.*)/) {
my $tag=IkiWiki::linkpage($2);
$tags{$params{page}}{$tag}=1;
+ push @{$links{$params{page}}}, tagpage($tag);
return htmllink($params{page}, $params{destpage},
tagpage($tag),
linktext => IkiWiki::pagetitle($1));
else {
my $tag=IkiWiki::linkpage($_);
$tags{$params{page}}{$tag}=1;
+ push @{$links{$params{page}}}, tagpage($tag);
return htmllink($params{page}, $params{destpage},
tagpage($tag));
}