diff options
author | Andrey Andreev <narf@devilix.net> | 2014-03-17 04:38:27 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-03-17 04:38:27 +0100 |
commit | 903f412b66b0cd3efb13b39ed51d799ae171444e (patch) | |
tree | c9216d46caac3c145f9ca70da80a4fd953602445 /system/helpers/text_helper.php | |
parent | 822ee81f74c86e7c5d713583fa0d615edd5d564c (diff) | |
parent | 8bc73ebe0971f313330e221d0f88155932993baf (diff) |
Merge pull request #2948 from ivantcholakov/develop
Making highlight_phrase() to be UTF-8 compatible on demand.
Diffstat (limited to 'system/helpers/text_helper.php')
-rw-r--r-- | system/helpers/text_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 = '<mark>', $tag_close = '</mark>') { 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; } } |