htmltidy: Avoid breaking the sidebar when websetup is running.
authorJoey Hess <joey@kitenet.net>
Thu, 3 Feb 2011 16:49:13 +0000 (12:49 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 3 Feb 2011 16:49:13 +0000 (12:49 -0400)
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.

IkiWiki/Plugin/htmltidy.pm
debian/changelog

index 1108aeb894e658a35eff011975c1c0b50d14a439..da77e60f1cb6198278e87897522fd74b553f95e9 100644 (file)
@@ -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 };
index 246a890803eb08460a80f9337c8289a28fcda280..87a280ed038aed378b490624f96011703d0ad8ec 100644 (file)
@@ -1,6 +1,7 @@
 ikiwiki (3.20110125) UNRELEASED; urgency=low
 
   * editpage: Avoid inheriting internal page types.
+  * htmltidy: Avoid breaking the sidebar when websetup is running.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 01 Feb 2011 21:00:57 -0400