X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9838bec93c976a71ed36c0996084ea28c0d3d71e..414ccfb1e298a722d2afa8b8540ca84dc1ccc6f2:/IkiWiki/Plugin/meta.pm

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