getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

Russian sympols search problems in version 1.10 #107

Closed ktaranov closed 7 years ago

ktaranov commented 7 years ago

Hi, guys.

Trying to search any Russian word and get error: mb_stripos(): Empty delimiter on …\user\plugins\simplesearch\simplesearch.php 243.

Problem in function matchText line 243:

$result = mb_stripos(iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $haystack), iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $needle));

If I rollback simplesearch.php on previous version (plugin version 1.9.3, where not used matchText function) search for Russian words works fine.

Could you fix this issue?

flaviocopes commented 7 years ago

Turn off Ignore accented characters in the plugin configuration.

flaviocopes commented 7 years ago

Should be solved in the next release