diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-11-16 15:51:00 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-16 15:51:00 -0500 |
commit | 4fa17df57de29e2b91c552c1b012f3f198dfaa2f (patch) | |
tree | c978335f92d40591afd6e5cf0a349f280f6ce95b /IkiWiki/Plugin | |
parent | 20cdadba32dfd0280a3d17aef7136c0490ccb3d7 (diff) |
meta: Generate meta description tags even when the html scrubber is enabled.
Unlike generic meta foo tags, meta description is known to be safe, so can
be special cased to be allowed despite the html scrubber. This makes meta
description much more useful, since it is otherwise limited to being used
by other plugins like map.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 6bdb6f39c..45d073e28 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -239,6 +239,10 @@ sub preprocess (@) { push @{$metaheaders{$page}}, '<meta name="robots"'. ' content="'.encode_entities($value).'" />'; } + elsif ($key eq 'description') { + push @{$metaheaders{$page}}, '<meta name="'.encode_entities($key). + '" content="'.encode_entities($value).'" />'; + } else { push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key). '" content="'.encode_entities($value).'" />', $destpage); |