summaryrefslogtreecommitdiffstats
path: root/system/helpers/text_helper.php
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2014-03-17 04:18:45 +0100
committerIvan Tcholakov <ivantcholakov@gmail.com>2014-03-17 04:18:45 +0100
commit8bc73ebe0971f313330e221d0f88155932993baf (patch)
treec9216d46caac3c145f9ca70da80a4fd953602445 /system/helpers/text_helper.php
parent822ee81f74c86e7c5d713583fa0d615edd5d564c (diff)
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.php2
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;
}
}