X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bbcf878f75ee5468c062b0a1569177b66be8001b..9b34b879e2825a1d8d0d930a01c35306891b823b:/IkiWiki/Plugin/meta.pm?ds=inline diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 74b630afc..81355ef6d 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -53,7 +53,7 @@ sub htmlize ($$$) { #{{{ my $page = shift; my $destpage = shift; - return IkiWiki::htmlize($page, pagetype($pagesources{$page}), + return IkiWiki::htmlize($page, $destpage, pagetype($pagesources{$page}), IkiWiki::linkify($page, $destpage, IkiWiki::preprocess($page, $destpage, shift))); } @@ -78,6 +78,15 @@ sub preprocess (@) { #{{{ # Metadata collection that needs to happen during the scan pass. if ($key eq 'title') { $pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value); + # fallthrough + } + elsif ($key eq 'description') { + $pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value); + # fallthrough + } + elsif ($key eq 'uuid') { + $pagestate{$page}{meta}{uuid}=HTML::Entities::encode_numeric($value); + # fallthrough } elsif ($key eq 'license') { push @{$metaheaders{$page}}, ''; @@ -140,10 +149,18 @@ sub preprocess (@) { #{{{ if (exists $params{server} && safeurl($params{server})) { push @{$metaheaders{$page}}, ''; + push @{$metaheaders{$page}}, ''; } if (safeurl($value)) { push @{$metaheaders{$page}}, ''; + push @{$metaheaders{$page}}, ''; + } + if (exists $params{"xrds-location"} && safeurl($params{"xrds-location"})) { + push @{$metaheaders{$page}}, ''; } } elsif ($key eq 'redir') { @@ -178,7 +195,7 @@ sub preprocess (@) { #{{{ $value=encode_entities($value); } my $delay=int(exists $params{delay} ? $params{delay} : 0); - my $redir=""; + my $redir=""; if (! $safe) { $redir=scrub($redir); } @@ -193,6 +210,10 @@ sub preprocess (@) { #{{{ " />\n"); } } + elsif ($key eq 'robots') { + push @{$metaheaders{$page}}, ''; + } else { push @{$metaheaders{$page}}, scrub(''); @@ -236,9 +257,7 @@ sub match { #{{{ my $page=shift; # turn glob into a safe regexp - my $re=quotemeta(shift); - $re=~s/\\\*/.*/g; - $re=~s/\\\?/./g; + my $re=IkiWiki::glob2re(shift); my $val; if (exists $pagestate{$page}{meta}{$field}) {