Unicode UTF support
-
Hello!
Thanks for nice plugin, but I am lacking one very important feature…
Working with multilingual sites, I encountered one problem, that it does not work with russian (cyrillic) keywords.
For this to work I edited lines 84, 85, 86 in wpa-seo-auto-linker.php to work with utf. I added “u” parementer to regular expressions and replaced strpos/stripos to mb_strpos/mb_stripos and everything works perfectly.
Here code:$reg_post = $options[‘casesens’] ? ‘/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($name)/msU’ : ‘/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($name)/imsuU’;
$reg = $options[‘casesens’] ? ‘/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))\b($name)\b/msU’ : ‘/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))\b($name)\b/imsuU’;
$strpos_fnc = $options[‘casesens’] ? ‘mb_strpos’ : ‘mb_stripos’;
- The topic ‘Unicode UTF support’ is closed to new replies.