From 574640b06943939d08ff99833f8028e091a6daf2 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Thu, 11 Dec 2008 19:36:36 -0500 Subject: Fix cut'n'past-o. --- doc/plugins/cutpaste.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/cutpaste.mdwn b/doc/plugins/cutpaste.mdwn index 1b78e60fc..f74f8a269 100644 --- a/doc/plugins/cutpaste.mdwn +++ b/doc/plugins/cutpaste.mdwn @@ -1,4 +1,4 @@ -[[!template id=plugin name=toggle author="[[Enrico]]"]] +[[!template id=plugin name=cutpaste author="[[Enrico]]"]] [[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/cut]], -- cgit v1.2.3 From 0983f4c81e8ac1e8ed6fc9a6e7d1165fd5387f70 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Thu, 11 Dec 2008 19:38:53 -0500 Subject: Fix too much quoting. --- doc/ikiwiki/directive/cutpaste.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/cutpaste.mdwn b/doc/ikiwiki/directive/cutpaste.mdwn index 012367bdf..ca580e54f 100644 --- a/doc/ikiwiki/directive/cutpaste.mdwn +++ b/doc/ikiwiki/directive/cutpaste.mdwn @@ -17,11 +17,11 @@ follow the paste directive that uses its text. In fact, this is quite useful to postpone big blocks of text like long annotations and have a more natural flow. For example: - \[[!toggleable id="cut" text="\[[!paste id=cutlongdesc]]"]] - \[[!toggleable id="copy" text="\[[!paste id=copylongdesc]]"]] - \[[!toggleable id="paste" text="\[[!paste id=pastelongdesc]]"]] + \[[!toggleable id="cut" text="[[!paste id=cutlongdesc]]"]] + \[[!toggleable id="copy" text="[[!paste id=copylongdesc]]"]] + \[[!toggleable id="paste" text="[[!paste id=pastelongdesc]]"]] - \[...some time later...] + [...some time later...] \[[!cut id=cutlongdesc text=""" blah blah blah @@ -40,7 +40,7 @@ Since you can paste without using double quotes, copy and paste can be used to nest directives that require multiline parameters inside each other: \[[!toggleable id=foo text=""" - \[[!toggleable id=bar text="\[[!paste id=baz]]"]] + [[!toggleable id=bar text="[[!paste id=baz]]"]] """]] \[[!cut id=baz text=""" -- cgit v1.2.3 From 35dcd53cf4ccd3cea9cfb72e23c0fb1a33a14980 Mon Sep 17 00:00:00 2001 From: justin Date: Fri, 12 Dec 2008 00:40:00 -0500 Subject: adding setup note --- doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn (limited to 'doc') diff --git a/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn b/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn new file mode 100644 index 000000000..0a1efa394 --- /dev/null +++ b/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn @@ -0,0 +1,5 @@ +In IkiWiki/Wrapper.pm, the gen_wrapper function finds out what srcdir and destdir are set to in the config, but does not use them. + +Later in the sub, when a new wiki.cgi wrapper is being created when calling ikiwiki --setup /path/to/setup, it will only work if cgi\_wrapper in the config file is set to the full path. Otherwise, it creates wiki.cgi in the current working directory. It works with the other wrapper it sets up in my config - post\_update (using git), as that shows in the config with a full path. + +One workaround would be to mention in the setup file that cgi_wrapper has to be the full path, not just the file name, but that seems silly when destdir is also specified in that file and that's where it should go, and $config{destdir} is a known value in the Wrapper.pm file. -- cgit v1.2.3 From 53c122b3bb0c1b44b1f1a0968d728d58d7aee9ae Mon Sep 17 00:00:00 2001 From: "http://john.choffee.co.uk/" Date: Fri, 12 Dec 2008 05:22:53 -0500 Subject: --- ...ubber__95__skip_setting.___40__patch__41__.mdwn | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn (limited to 'doc') 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('', $page); ++ push @{$metaheaders{$page}}, scrub(''); + } + } + elsif ($key eq 'stylesheet') { +@@ -206,7 +207,7 @@ + my $delay=int(exists $params{delay} ? $params{delay} : 0); + my $redir=""; + 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('', $page); ++ '" content="'.encode_entities($value).'" />'); + } + + return ""; + -- cgit v1.2.3 From b8c16705006a8f4562bd2f2b525a9d978ed18a8b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 12 Dec 2008 06:29:02 -0500 Subject: update with some more code improvements --- doc/plugins/contrib/comments.mdwn | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/comments.mdwn b/doc/plugins/contrib/comments.mdwn index a832c571a..47295ebe1 100644 --- a/doc/plugins/contrib/comments.mdwn +++ b/doc/plugins/contrib/comments.mdwn @@ -50,12 +50,12 @@ can use the following additional ``s: * `COMMENTAUTHORURL`: if the user was signed in with an OpenID, that URL; if the user was signed in with some other username, a CGI URL that redirects to their user page (if any) -This plugin also adds a `\[[!comment]]` directive which is used when storing comments. This -directive shouldn't be used on pages that are edited in the usual way. +This plugin also adds a `\[[!_comment]]` directive which is used when storing comments. This +directive is for internal use only and shouldn't be used on pages that are edited in the usual way. This plugin aims to close the [[todo]] item "[[todo/supporting_comments_via_disussion_pages]]", and is currently available from [[smcv]]'s git repository on git.pseudorandom.co.uk (it's the -`comments-rebase1` branch). A demo wiki with the plugin enabled is running at +`comments-rebase2` branch). A demo wiki with the plugin enabled is running at ; the [sandbox page](http://www.pseudorandom.co.uk/2008/ikiwiki/demo/sandbox/#comments) has some examples of comments. @@ -67,11 +67,8 @@ Known issues: * There is some common code cargo-culted from other plugins (notably inline and editpage) which should probably be shared * Joey doesn't think it should necessarily use internal pages (see [[discussion]]) -* `\[[!comment]]` should perhaps be `\[[!_comment]]`, or a special filter/htmlize hook rather - than being a directive at all * Previews always say "unknown IP address" -* [[todo/inline_plugin:_ability_to_override_the_feed_name]] -* [[todo/inline_plugin:_hide_feed_buttons_if_empty]] +* Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID > I haven't done a detailed code review, but I will say I'm pleased you > avoided re-implementing inline! --[[Joey]] @@ -84,5 +81,9 @@ Fixed issues: * tbm wanted anonymous people to be able to enter their name and possibly email address; a name and website can now be supplied * There is now an indication of who you're signed in as -* Each comment is now one big \[[!comment]] directive invocation, avoiding previous +* Each comment is now one big \[[!_comment]] directive invocation, avoiding previous issues with unambiguous and un-spoofable metadata +* `\[[!comment]]` should be `\[[!_comment]]`, or a special filter/htmlize hook rather + than being a directive at all +* [[todo/inline_plugin:_ability_to_override_the_feed_name]] +* [[todo/inline_plugin:_hide_feed_buttons_if_empty]] -- cgit v1.2.3 From 5625be3bcd76b5990cb7799437def3521cc53a9d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 12 Dec 2008 06:34:51 -0500 Subject: Another TODO item --- doc/plugins/contrib/comments.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/comments.mdwn b/doc/plugins/contrib/comments.mdwn index 47295ebe1..d2ca8d17d 100644 --- a/doc/plugins/contrib/comments.mdwn +++ b/doc/plugins/contrib/comments.mdwn @@ -69,6 +69,8 @@ Known issues: * Joey doesn't think it should necessarily use internal pages (see [[discussion]]) * Previews always say "unknown IP address" * Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID +* The default template should have a (?) icon next to unauthenticated users (with the IP address + as title) and an OpenID icon next to OpenIDs > I haven't done a detailed code review, but I will say I'm pleased you > avoided re-implementing inline! --[[Joey]] -- cgit v1.2.3 From 88e8d4bf8d99b6df83deb680f1ed8685e6447875 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Dec 2008 14:06:45 -0500 Subject: meta: Pass info to htmlscrubber so htmlscrubber_skip can take effect. --- IkiWiki/Plugin/meta.pm | 13 +++--- debian/changelog | 1 + ...ubber__95__skip_setting.___40__patch__41__.mdwn | 53 +--------------------- 3 files changed, 9 insertions(+), 58 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 8d444109f..3991797c0 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -38,9 +38,10 @@ sub needsbuild (@) { #{{{ } } -sub scrub ($) { #{{{ +sub scrub ($$) { #{{{ if (IkiWiki::Plugin::htmlscrubber->can("sanitize")) { - return IkiWiki::Plugin::htmlscrubber::sanitize(content => shift); + return IkiWiki::Plugin::htmlscrubber::sanitize( + content => shift, destpage => shift); } else { return shift; @@ -137,7 +138,7 @@ sub preprocess (@) { #{{{ elsif ($key eq 'permalink') { if (safeurl($value)) { $pagestate{$page}{meta}{permalink}=$value; - push @{$metaheaders{$page}}, scrub(''); + push @{$metaheaders{$page}}, scrub('', $destpage); } } elsif ($key eq 'stylesheet') { @@ -206,7 +207,7 @@ sub preprocess (@) { #{{{ my $delay=int(exists $params{delay} ? $params{delay} : 0); my $redir=""; if (! $safe) { - $redir=scrub($redir); + $redir=scrub($redir, $destpage); } push @{$metaheaders{$page}}, $redir; } @@ -216,7 +217,7 @@ sub preprocess (@) { #{{{ join(" ", map { encode_entities($_)."=\"".encode_entities(decode_entities($params{$_}))."\"" } keys %params). - " />\n"); + " />\n", $destpage); } } elsif ($key eq 'robots') { @@ -225,7 +226,7 @@ sub preprocess (@) { #{{{ } else { push @{$metaheaders{$page}}, scrub(''); + '" content="'.encode_entities($value).'" />', $destpage); } return ""; diff --git a/debian/changelog b/debian/changelog index 1ff78d749..bf14860dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ ikiwiki (2.71) UNRELEASED; urgency=low * inline: Support emptyfeeds=no option to skip generating empty feeds. * inline: Support feedfile option to change the filename of the feed generated. + * meta: Pass info to htmlscrubber so htmlscrubber_skip can take effect. -- Joey Hess Mon, 17 Nov 2008 14:02:10 -0500 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 index 9d67d6662..0e40da551 100644 --- 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 @@ -8,55 +8,4 @@ Setting htmlscrubber_skip to the pagespec should stop this getting scrubbed but 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('', $page); -+ push @{$metaheaders{$page}}, scrub(''); - } - } - elsif ($key eq 'stylesheet') { -@@ -206,7 +207,7 @@ - my $delay=int(exists $params{delay} ? $params{delay} : 0); - my $redir=""; - 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('', $page); -+ '" content="'.encode_entities($value).'" />'); - } - - return ""; - +> [[done]], thanks for the patch --[[Joey]] -- cgit v1.2.3