Merge branch 'master' of ssh://git.ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Fri, 29 Jul 2011 10:54:39 +0000 (12:54 +0200)
committerJoey Hess <joey@kitenet.net>
Fri, 29 Jul 2011 10:54:39 +0000 (12:54 +0200)
IkiWiki/Plugin/meta.pm
IkiWiki/Plugin/tag.pm
debian/changelog

index e9736584c5836fb9c4a077819ca6b939fd248aa9..220fff9dccaa547824ccb0bc7a19ddbe583f516d 100644 (file)
@@ -312,14 +312,16 @@ sub pagetemplate (@) {
                $template->param(title_overridden => 1);
        }
 
-       foreach my $field (qw{author authorurl permalink}) {
+       foreach my $field (qw{author authorurl}) {
                $template->param($field => $pagestate{$page}{meta}{$field})
                        if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
        }
 
        foreach my $field (qw{permalink}) {
-               $template->param($field => IkiWiki::urlabs($pagestate{$page}{meta}{$field}, $config{url}))
-                       if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
+               if (exists $pagestate{$page}{meta}{$field} && $template->query(name => $field)) {
+                       eval q{use HTML::Entities};
+                       $template->param($field => HTML::Entities::encode_entities(IkiWiki::urlabs($pagestate{$page}{meta}{$field}, $config{url})));
+               }
        }
 
        foreach my $field (qw{description}) {
index ca74fef9021f660a3420903a1715bf4cf0867808..096c92616aa76e2414775b6ed67f8ef9fecd24bf 100644 (file)
@@ -199,8 +199,10 @@ sub pagetemplate (@) {
        if ($template->query(name => "categories")) {
                # It's an rss/atom template. Add any categories.
                if (defined $tags && %$tags) {
-                       $template->param(categories => [map { category => tagname($_) },
-                               sort keys %$tags]);
+                       eval q{use HTML::Entities};
+                       $template->param(categories =>
+                               [map { category => HTML::Entities::encode_entities(tagname($_)) },
+                                       sort keys %$tags]);
                }
        }
 }
index 0cb094a8d160afff8808f3dc3d98fd45775261fe..66389f3fb01d62bf35afbeabee262c398b5da0cd 100644 (file)
@@ -11,6 +11,8 @@ ikiwiki (3.20110716) UNRELEASED; urgency=low
   * po: Add `LANG_CODE` and `LANG_NAME` template variables. (intrigeri)
   * Fix typo in Danish translation of shortcuts page that caused expoentional
     regexp blowup.
+  * Fix escaping of html entities in permalinks.
+  * Fix escaping of html entities in tag names.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 19 Jul 2011 11:22:52 -0400