summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-04-12 12:30:24 -0400
committerJoey Hess <joey@kitenet.net>2011-04-12 12:30:24 -0400
commitd22489299adb04fdce241a9365b47799ba7f66d6 (patch)
tree6a234a859b1ac69a21d4feb15e6275cad7a85e46 /IkiWiki
parent6da98ac3f7bccc9d843eca44d53b35612458d9f5 (diff)
meta: Fix bug in loading of HTML::Entities that can break inline archive=yes (mostly masked by other plugins that load the module).
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/meta.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index eebe3460f..434fde527 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -300,7 +300,8 @@ sub pagetemplate (@) {
$template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
}
if (exists $pagestate{$page}{meta}{title} && $template->query(name => "title")) {
- $template->param(title => HTML::Entities::encode_numeric($pagestate{$page}{meta}{title}));
+ eval q{use HTML::Entities};
+ $template->param(title => encode_numeric($pagestate{$page}{meta}{title}));
$template->param(title_overridden => 1);
}
@@ -315,7 +316,8 @@ sub pagetemplate (@) {
}
foreach my $field (qw{description}) {
- $template->param($field => HTML::Entities::encode_numeric($pagestate{$page}{meta}{$field}))
+ eval q{use HTML::Entities};
+ $template->param($field => encode_numeric($pagestate{$page}{meta}{$field}))
if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
}