summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhttp://john.choffee.co.uk/ <http://john.choffee.co.uk/@web>2008-12-12 05:22:53 -0500
committerJoey Hess <joey@kitenet.net>2008-12-12 05:22:53 -0500
commit53c122b3bb0c1b44b1f1a0968d728d58d7aee9ae (patch)
tree1e38f6b49c01d458b5cf4357a7f99b63c7f688e7 /doc
parent35dcd53cf4ccd3cea9cfb72e23c0fb1a33a14980 (diff)
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn62
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn b/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn
new file mode 100644
index 000000000..9d67d6662
--- /dev/null
+++ b/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn
@@ -0,0 +1,62 @@
+I have been trying to include some meta info using the link setting something like the below
+
+ meta link="http://www.example.com/" rel="command" name="Example"
+
+This gets removed by the htmlscrubber as you would expect.
+
+Setting htmlscrubber_skip to the pagespec should stop this getting scrubbed but it does not.
+
+Below is a patch to fix that. It seams to work but I am not sure of it is the correct thing to do.
+
+--- meta.pm 2008-12-11 17:50:33.000000000 +0000
++++ meta.pm.orig 2008-12-10 17:41:23.000000000 +0000
+@@ -38,9 +38,10 @@
+ }
+ }
+
+-sub scrub (@) { #{{{
++sub scrub ($) { #{{{
+ if (IkiWiki::Plugin::htmlscrubber->can("sanitize")) {
+- return IkiWiki::Plugin::htmlscrubber::sanitize(content => shift, destpage => shift);
++ #return IkiWiki::Plugin::htmlscrubber::sanitize(content => shift);
++ return shift;
+ }
+ else {
+ return shift;
+@@ -137,7 +138,7 @@
+ elsif ($key eq 'permalink') {
+ if (safeurl($value)) {
+ $pagestate{$page}{meta}{permalink}=$value;
+- push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $page);
++ push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />');
+ }
+ }
+ elsif ($key eq 'stylesheet') {
+@@ -206,7 +207,7 @@
+ my $delay=int(exists $params{delay} ? $params{delay} : 0);
+ my $redir="<meta http-equiv=\"refresh\" content=\"$delay; URL=$value\" />";
+ if (! $safe) {
+- $redir=scrub($redir, $page);
++ $redir=scrub($redir);
+ }
+ push @{$metaheaders{$page}}, $redir;
+ }
+@@ -216,7 +217,7 @@
+ join(" ", map {
+ encode_entities($_)."=\"".encode_entities(decode_entities($params{$_}))."\""
+ } keys %params).
+- " />\n", $page);
++ " />\n");
+ }
+ }
+ elsif ($key eq 'robots') {
+@@ -225,7 +226,7 @@
+ }
+ else {
+ push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key).
+- '" content="'.encode_entities($value).'" />', $page);
++ '" content="'.encode_entities($value).'" />');
+ }
+
+ return "";
+