Sorry. It’s all right, but after some correction of php code.
It was not understand cyrillic symbols.
just replaced a line
/* Replace any instance of the cat_name with the cat_name wrapped in a HREF to link_url */
$text = preg_replace(“|($page->post_title)|iu”,”$1” , $text);