From 8bc73ebe0971f313330e221d0f88155932993baf Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Mon, 17 Mar 2014 05:18:45 +0200 Subject: Making highlight_phrase() to be UTF-8 compatible on demand. --- system/helpers/text_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index af14dfea2..ca19ab98b 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -351,7 +351,7 @@ if ( ! function_exists('highlight_phrase')) function highlight_phrase($str, $phrase, $tag_open = '', $tag_close = '') { return ($str !== '' && $phrase !== '') - ? preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open.'\\1'.$tag_close, $str) + ? preg_replace('/('.preg_quote($phrase, '/').')/i'.(UTF8_ENABLED ? 'u' : ''), $tag_open.'\\1'.$tag_close, $str) : $str; } } -- cgit v1.2.3-24-g4f1b