X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/4d8b2d84d5635e0e718e9f66fcdf6e20587fbc2c..279db7860dc98bedbd8333bb7de57251dcfb223d:/IkiWiki/Plugin/template.pm diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index 690443558..416762fe1 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -4,7 +4,7 @@ package IkiWiki::Plugin::template; use warnings; use strict; -use IkiWiki; +use IkiWiki 2.00; use HTML::Template; use Encode; @@ -46,11 +46,19 @@ sub preprocess (@) { #{{{ } foreach my $param (keys %params) { - $template->param($param => $params{$param}); + if ($template->query(name => $param)) { + $template->param($param => + IkiWiki::htmlize($params{page}, + pagetype($pagesources{$params{page}}), + $params{$param})); + } + if ($template->query(name => "raw_$param")) { + $template->param("raw_$param" => $params{$param}); + } } return IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, + IkiWiki::filter($params{page}, $params{destpage}, $template->output)); } # }}}