]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/template.pm
chomp template values
[git.ikiwiki.info.git] / IkiWiki / Plugin / template.pm
index e5a0c05c3798470a6a787589b96d0fae7f876988..52c482c380a706d1f9fd04e4dd74e02b63f26a53 100644 (file)
@@ -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 {
@@ -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);
                }
        }