X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/ee8d237f98b2c82b441dc7c26f6ce8545362cb73..c8b34aa31c7d146adf4210c6171dfea2988a7688:/IkiWiki/Plugin/template.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index e5a0c05c3..b8c2f05b2 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 { @@ -53,15 +53,17 @@ sub preprocess (@) { foreach my $param (keys %params) { my $value=IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{destpagea}, + IkiWiki::filter($params{page}, $params{destpage}, $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); } }