Fix escaping of html entities in permalinks.

master
Joey Hess 2011-07-29 12:37:43 +02:00
parent 81d2edad0e
commit 65a7bc4e06
2 changed files with 6 additions and 3 deletions

View 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}) {

1
debian/changelog vendored
View File

@ -11,6 +11,7 @@ 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.
-- Joey Hess <joeyh@debian.org> Tue, 19 Jul 2011 11:22:52 -0400