]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
also decode html entities in the title
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index 1ee1b8fdb9bf52bae52d67b517f0a2032287e23d..5e1d98a7248a643d438bfb88086c3ac2d906df5a 100644 (file)
@@ -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"
        );