From ae76bfc99e588c14f612738d1abca2312167391d Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 29 Sep 2016 17:18:58 +0700 Subject: [PATCH] [ticket/14801] Highlighting utf8 strings in search results PHPBB3-14801 --- phpBB/search.php | 6 +++--- 1 file 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&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&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&mode=deleted_topics&t=$result_topic_id", true, $user->session_id) : $u_mcp_queue; - $row['topic_title'] = preg_replace('#(?!<.*)(?]*(?:)#is', '$1', $row['topic_title']); + $row['topic_title'] = preg_replace('#(?!<.*)(?]*(?:)#isu', '$1', $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('#(?!<.*)(?]*(?:)#is', '$1', $row['post_text']); - $row['post_subject'] = preg_replace('#(?!<.*)(?]*(?:)#is', '$1', $row['post_subject']); + $row['post_text'] = preg_replace('#(?!<.*)(?]*(?:)#isu', '$1', $row['post_text']); + $row['post_subject'] = preg_replace('#(?!<.*)(?]*(?:)#isu', '$1', $row['post_subject']); } $tpl_ary = array(