meta: Generate meta description tags even when the html scrubber is enabled.
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 16 Nov 2009 20:51:00 +0000 (15:51 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 16 Nov 2009 20:51:00 +0000 (15:51 -0500)
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.

IkiWiki/Plugin/meta.pm
debian/changelog
doc/ikiwiki/directive/meta.mdwn

index 6bdb6f39ccf9fa61fecac50c5f5aa36923c2de9f..45d073e2881cfd544d676fea15bb9d2e5e13baf5 100644 (file)
@@ -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);
index ad80d37b75e83f466df081928284c0c713a6cc9a..9bddf0733366d60653749d0a0e6ba09da4fdfc77 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.20091114) UNRELEASED; urgency=low
+
+  * meta: Generate meta description tags even when the html scrubber is
+    enabled.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Nov 2009 15:46:45 -0500
+
 ikiwiki (3.20091113) unstable; urgency=low
 
   * underlay: Fix example values put in setup file to be array
index 000f461c9751f9fba13f7eba71880568819c654c..557441c0b8dbe424a62657d38b156a36fba92482 100644 (file)
@@ -43,8 +43,8 @@ Supported fields:
 
 * description
 
-  Specifies a "description" of the page. You could use this to provide
-  a summary, for example, to be picked up by the [[map]] directive.
+  Specifies a short description for the page. This will be put in
+  the html header, and can also be displayed by eg, the [[map]] directive.
 
 * permalink