aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-11-16 15:51:00 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-11-16 15:51:00 -0500
commit4fa17df57de29e2b91c552c1b012f3f198dfaa2f (patch)
treec978335f92d40591afd6e5cf0a349f280f6ce95b
parent20cdadba32dfd0280a3d17aef7136c0490ccb3d7 (diff)
downloadikiwiki-4fa17df57de29e2b91c552c1b012f3f198dfaa2f.tar
ikiwiki-4fa17df57de29e2b91c552c1b012f3f198dfaa2f.tar.gz
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.
-rw-r--r--IkiWiki/Plugin/meta.pm4
-rw-r--r--debian/changelog7
-rw-r--r--doc/ikiwiki/directive/meta.mdwn4
3 files changed, 13 insertions, 2 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);
diff --git a/debian/changelog b/debian/changelog
index ad80d37b7..9bddf0733 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn
index 000f461c9..557441c0b 100644
--- a/doc/ikiwiki/directive/meta.mdwn
+++ b/doc/ikiwiki/directive/meta.mdwn
@@ -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