]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/search.pm
also decode html entities in the title
[ikiwiki.git] / IkiWiki / Plugin / search.pm
index 3ea4c6b7f01fcb644c217c7fa9e38bde22a2406d..5e1d98a7248a643d438bfb88086c3ac2d906df5a 100644 (file)
@@ -94,10 +94,12 @@ sub index (@) { #{{{
        $sample=~s/\n/ /g;
        
        # 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"
        );