From: Joey Hess Date: Sat, 24 Apr 2010 05:13:58 +0000 (-0400) Subject: chomp template values X-Git-Tag: 3.20100427~24 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/df012e54c7bf5a8e8fb2cb3c2f8cbf8dc30686f9 chomp template values Before the template reorg, this was done by a template filter. --- diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index d2b2fef55..52c482c38 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -56,12 +56,14 @@ sub preprocess (@) { IkiWiki::filter($params{page}, $params{destpagea}, $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); } }