Add a patch tag
[ikiwiki.git] / doc / bugs / Undefined_subroutine_IkiWiki::escapeHTML.mdwn
1 Trying to upgrade to IkiWiki 2.41+ (git head), whenever I try to edit a page I get:
2
3     [Mon Apr 07 16:53:33 2008] [error] [client 68.122.117.135] Undefined subroutine &IkiWiki::escapeHTML called at /root/ikiwiki/install/share/perl/5.8.8/IkiWiki.pm line 610.
4     [Mon Apr 07 16:53:33 2008] [error] [client 68.122.117.135] Premature end of script headers: wrapper.cgi
5
6 This patch appears to fix it for me:
7
8     --- IkiWiki.pm      2008-04-07 17:05:04.000000000 -0400
9     +++ /usr/share/perl5/IkiWiki.pm     2008-04-07 18:03:55.000000000 -0400
10     @@ -621,6 +619,9 @@
11                 return "<a href=\"$user\">$oiduser</a>";
12         }
13         else {
14     +           eval q{use CGI 'escapeHTML'};
15     +           error($@) if $@;
16     +
17                 return htmllink("", "", escapeHTML(
18                         length $config{userdir} ? $config{userdir}."/".$user : $user
19                 ), noimageinline => 1);
20
21 That's dirty and wrong though... Can you suggest a better fix?  -- [[sabr]]
22
23 > Hmm, I think I've not noticed this because the openid plugin hides it. 
24 > Bet you have openid disabled.
25
26 > Anyway, your fix is fine, [[applied|done]]. --[[Joey]]
27 >> Actually, I do have openid enabled.  Passwordauth is disabled, dunno if that matters.  My setup file is here: <http://iki.u32.net/iki.setup>