]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
chomp template values
authorJoey Hess <joey@kitenet.net>
Sat, 24 Apr 2010 05:13:58 +0000 (01:13 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 24 Apr 2010 05:13:58 +0000 (01:13 -0400)
Before the template reorg, this was done by a template filter.

IkiWiki/Plugin/template.pm

index d2b2fef55fbec15fef890f52c7cb9c2f0d56d3e6..52c482c380a706d1f9fd04e4dd74e02b63f26a53 100644 (file)
@@ -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);
                }
        }