summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/template.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-24 01:13:58 -0400
committerJoey Hess <joey@kitenet.net>2010-04-24 01:13:58 -0400
commitdf012e54c7bf5a8e8fb2cb3c2f8cbf8dc30686f9 (patch)
treed38823f149c5f9eda2d51d329f7603fea069ed15 /IkiWiki/Plugin/template.pm
parentc0b2334815303d4dc2fdf0b22dff12085671c8d8 (diff)
chomp template values
Before the template reorg, this was done by a template filter.
Diffstat (limited to 'IkiWiki/Plugin/template.pm')
-rw-r--r--IkiWiki/Plugin/template.pm8
1 files changed, 5 insertions, 3 deletions
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);
}
}