aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-09-29 17:18:58 +0700
committerrxu <rxu@mail.ru>2016-09-29 17:18:58 +0700
commitae76bfc99e588c14f612738d1abca2312167391d (patch)
tree9f0bbdb9843b07e024dc228e13d7bd88440efd56 /phpBB/search.php
parent6972d06f5921c9fab8e469139ed5646bb495eb8e (diff)
downloadforums-ae76bfc99e588c14f612738d1abca2312167391d.tar
forums-ae76bfc99e588c14f612738d1abca2312167391d.tar.gz
forums-ae76bfc99e588c14f612738d1abca2312167391d.tar.bz2
forums-ae76bfc99e588c14f612738d1abca2312167391d.tar.xz
forums-ae76bfc99e588c14f612738d1abca2312167391d.zip
[ticket/14801] Highlighting utf8 strings in search results
PHPBB3-14801
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 03575f7e0b..89f0e574c3 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1060,7 +1060,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$result_topic_id", true, $user->session_id) : '';
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;mode=deleted_topics&amp;t=$result_topic_id", true, $user->session_id) : $u_mcp_queue;
- $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
+ $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['topic_title']);
$tpl_ary = array(
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -1143,8 +1143,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($hilit)
{
// post highlighting
- $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
- $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
+ $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_text']);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_subject']);
}
$tpl_ary = array(