aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-02-03 12:49:13 -0400
committerJoey Hess <joey@kitenet.net>2011-02-03 12:49:13 -0400
commit8e604c0f0af37c528f7d82540a891d26926c9938 (patch)
tree7129aafd86846b09331b9313eb889d458cc5a5c2 /IkiWiki
parent9ed779b746de86b92a1c08f1b2b4196d42149e55 (diff)
downloadikiwiki-8e604c0f0af37c528f7d82540a891d26926c9938.tar
ikiwiki-8e604c0f0af37c528f7d82540a891d26926c9938.tar.gz
htmltidy: Avoid breaking the sidebar when websetup is running.
Problem was this: websetup loads all plugins, but does not checkconfig them. So, htmltidy's recently added configurable command setting was unset; this resulted in its sanitize hook failing; the sanitize hook is called when a sidebar was enabled, and this caused the sidebar to not display. I put in a fix, but the underlying problem is that websetup loads all plugins but leaves them in an unconfigured and possibly broken state while trying to display its forms. Probably the long-term fix is to have it cache the original hook states from before loading the plugins, and restore it after getting their configuration. Or, even to get the configuration using a subprocess, as plugins may do things outside the hook system.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/htmltidy.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/htmltidy.pm b/IkiWiki/Plugin/htmltidy.pm
index 1108aeb89..da77e60f1 100644
--- a/IkiWiki/Plugin/htmltidy.pm
+++ b/IkiWiki/Plugin/htmltidy.pm
@@ -41,6 +41,8 @@ sub checkconfig () {
sub sanitize (@) {
my %params=@_;
+ return $params{content} unless defined $config{htmltidy};
+
my $pid;
my $sigpipe=0;
$SIG{PIPE}=sub { $sigpipe=1 };