$ret.=$linktemplate->output;
}
+ require HTML::Template;
my @params=IkiWiki::template_params($params{template}.".tmpl", blind_cache => 1);
if (! @params) {
return sprintf(gettext("nonexistant template %s"), $params{template});
my $url=$baseurl;
$url=~s/[^\/]+$//;
- $content=~s/(<a(?:\s+(?:class|id)="?\w+"?)?)\s+href="(#[^"]+)"/$1 href="$baseurl$2"/ig;
- $content=~s/(<a(?:\s+(?:class|id)="?\w+"?)?)\s+href="(?!\w+:\/\/)([^"]+)"/$1 href="$url$2"/ig;
- $content=~s/(<img(?:\s+(?:class|id)="?\w+"?)?)\s+src="(?!\w+:\/\/)([^"]+)"/$1 src="$url$2"/ig;
+ $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(#[^"]+)"/$1 href="$baseurl$2"/mig;
+ $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:\/\/)([^"]+)"/$1 href="$url$2"/mig;
+ $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:\/\/)([^"]+)"/$1 src="$url$2"/mig;
return $content;
} #}}}
my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
$itemtemplate->param(
- title => pagetitle(basename($p), 1),
+ title => pagetitle(basename($p)),
url => $u,
permalink => $u,
date_822 => date_822($pagectime{$p}),
my $template=template($feedtype."page.tmpl", blind_cache => 1);
$template->param(
- title => $page ne "index" ? pagetitle($page, 1) : $config{wikiname},
+ title => $page ne "index" ? pagetitle($page) : $config{wikiname},
wikiname => $config{wikiname},
pageurl => $url,
content => $content,