aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-07-29 12:37:43 +0200
committerJoey Hess <joey@kitenet.net>2011-07-29 12:37:43 +0200
commit65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f (patch)
treea38aa767de118d32cac74256772975324739efc1 /IkiWiki
parent81d2edad0e7f4ced4f02f23e80dc6a10966ac317 (diff)
downloadikiwiki-65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f.tar
ikiwiki-65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f.tar.gz
Fix escaping of html entities in permalinks.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/meta.pm8
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}) {