diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-06-04 00:38:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-06-04 00:38:40 -0400 |
commit | ce826411b20f94a6ff95b87574b355f897547840 (patch) | |
tree | a51fc68b21ac2f53fdb6148feec065a3258dafff /IkiWiki/Plugin | |
parent | aefe5dd9cb270bd4fceb7922f0a0b09263d211ee (diff) | |
download | ikiwiki-ce826411b20f94a6ff95b87574b355f897547840.tar ikiwiki-ce826411b20f94a6ff95b87574b355f897547840.tar.gz |
more search improvements
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/search.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 2de1cf7ac..943af1313 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -80,13 +80,14 @@ sub filter (@) { #{{{ # Remove any html from text to be indexed. # TODO: This removes html that is in eg, a markdown pre, - # which should not be removed. + # which should not be removed, really. if (! defined $scrubber) { eval q{use HTML::Scrubber}; - error($@) if $@; - $scrubber=HTML::Scrubber->new(allow => []); + if (! $@) { + $scrubber=HTML::Scrubber->new(allow => []); + } } - my $toindex=$scrubber->scrub($params{content}); + my $toindex = defined $scrubber ? $scrubber->scrub($params{content}) : $params{content}; # Take 512 characters for a sample, then extend it out # if it stopped in the middle of a word. |