X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/753bfb17a0b593137341fe61c1a7db5dccd00efa..eda2357c3e1990df049264735e8751af8962ded5:/IkiWiki/Plugin/template.pm diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index fc8292010..db26bfe31 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -33,7 +33,7 @@ sub preprocess (@) { error gettext("missing id parameter") } - # The bare id is used, so a page templates/$id will be used as + # The bare id is used, so a page templates/$id can be used as # the template. my $template; eval { @@ -41,7 +41,7 @@ sub preprocess (@) { blind_cache => 1); }; if ($@) { - error gettext("failed to process:")." $@"; + error gettext("failed to process template:")." $@"; } if (! $template) { error sprintf(gettext("%s not found"), @@ -53,22 +53,22 @@ sub preprocess (@) { foreach my $param (keys %params) { my $value=IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{destpagea}, - $params{$param}), $scan); + $params{$param}, $scan); if ($template->query(name => $param)) { - $template->param($param => - IkiWiki::htmlize($params{page}, $params{destpage}, + my $htmlvalue=IkiWiki::htmlize($params{page}, $params{destpage}, pagetype($pagesources{$params{page}}), - $value)); + $value); + chomp $htmlvalue; + $template->param($param => $htmlvalue); } if ($template->query(name => "raw_$param")) { + chomp $value; $template->param("raw_$param" => $value); } } return IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{destpage}, - $template->output), $scan); + $template->output, $scan); } 1