diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-29 12:37:43 +0200 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-29 12:37:43 +0200 |
commit | 65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f (patch) | |
tree | a38aa767de118d32cac74256772975324739efc1 /IkiWiki | |
parent | 81d2edad0e7f4ced4f02f23e80dc6a10966ac317 (diff) | |
download | ikiwiki-65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f.tar ikiwiki-65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f.tar.gz |
Fix escaping of html entities in permalinks.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index e9736584c..220fff9dc 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -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}) { |