so, there's the bug, that if hiliting matches something that's a entity, or some other plugin parameters, it makes a mess:
here's sample where "3" being hilited of ' escape variant of ' as
�<span class="search_hit">3</span>9;
demonstration:
https://www.dokuwiki.org/playground:hiliting?s[]=karsumm&s[]=mesimumm&s[]=3