@Akots
1. For the coding UTF8 at discrepancy of the register of letters highlighting does not work. It is connected to features of functions preg - it is necessary to add a key "u". In the file search.class.inc.php correction:
$finalExtract = preg_replace( ’/’ . preg_quote( $searchTerm, ’/’ ) . ’/iu’, …
and in the plugin searchHighlight:
$pattern = ’/’ . preg_quote($word, ’/’) . ’(?=[^>]*<)/iu’;
I know this update done by yourselft for the Russian language. I haven’t integrated this update because it doesn’t run on my environment with english or french langauge in UTF8.
2. At use html entitys a scrap of a required fragment can give out only a part, for example &quo or something similar. For correction in the file search.class.inc.php at the beginning of function getExtract it is necessary to add something like:
$text=html_entity_decode($text, ENT_QUOTES, "UTF-8");
and at the end of function to correct a command approximately so:
$finalExtract .= $extracts[$i][’etcLeft’] . htmlentities($mbSubstr($text,$extracts[$i][’left’],$extracts[$i][’right’] - $extracts[$i][’left’]+1), ENT_QUOTES, "UTF-8") …
As we use, urlencode, htmlentities is not required and generate lot of issue. About that look at this post:
http://modxcms.com/forums/index.php/topic,5357.msg154012.html#msg154012
On
http://www.modx.wangba.fr/index.php?id=144 choose the french documents (accented language) And run the following tests:
1/ try "d’enfants"
2/ try "3,9%"
3/ try "UNESCO/Eduardo"
The limitation is "&test". Try it, you don’t find any text ... this due to tinyMCE which store & as &
Try "&test" and you got the result
May be to bypass this issue, it could be interesting, to use the stripInput function to replace on fly & by &
I am not sure to be able do more