diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/recentchanges.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/search.pm | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 8135f9adb..c8d222edb 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -39,6 +39,14 @@ sub pagetemplate (@) { #{{{ my %params=@_; my $template=$params{template}; my $page=$params{page}; + + # XXX this is here because I've been seeing a strange uninitialized + # value in this sub. + if (! defined $page) { + eval q{use Carp}; + Carp::cluck("undefined page; please report this to Joey"); + } + if ($config{rcs} && $page ne $config{recentchangespage} && $template->query(name => "recentchangesurl")) { $template->param(recentchangesurl => urlto($config{recentchangespage}, $page)); diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 1ee1b8fdb..5e1d98a72 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -92,15 +92,14 @@ sub index (@) { #{{{ } } $sample=~s/\n/ /g; - # Decode html entities in the sample since omega encodes them. - eval q{use HTML::Entities}; - $sample=decode_entities($sample); # data used by omega + # Decode html entities in it, since omega re-encodes them. + eval q{use HTML::Entities}; $doc->set_data( "url=".urlto($params{page}, "")."\n". - "sample=$sample\n". - "caption=$title\n". + "sample=".decode_entities($sample)."\n". + "caption=".decode_entities($title)."\n". "modtime=$IkiWiki::pagemtime{$params{page}}\n". "size=".length($params{content})."\n" ); |