diff options
| author | Oliver Schramm <oliver.schramm97@gmail.com> | 2014-04-13 21:15:14 +0200 |
|---|---|---|
| committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2014-04-13 21:15:14 +0200 |
| commit | face175471b5064117ca57ece53a3403e51e20ba (patch) | |
| tree | a0954756c4e4c1d56f96e9a0cb3ee52e5ae5a4ce /phpBB/viewtopic.php | |
| parent | 02378e94e779bbd407ef86166884c00e32d152fc (diff) | |
| download | forums-face175471b5064117ca57ece53a3403e51e20ba.tar forums-face175471b5064117ca57ece53a3403e51e20ba.tar.gz forums-face175471b5064117ca57ece53a3403e51e20ba.tar.bz2 forums-face175471b5064117ca57ece53a3403e51e20ba.tar.xz forums-face175471b5064117ca57ece53a3403e51e20ba.zip | |
[ticket/10423] Move code into a function and add tests for it
PHPBB3-10423
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 4c9302dbbe..31bc1d2701 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -475,7 +475,7 @@ if ($hilit_words) { if (trim($word)) { - $word = preg_replace('#\s+#u', ' ', trim(preg_replace('#(?<=^|\s)\*(?=\s|$)#', '', $word))); + $word = phpbb_clean_search_string($word); $word = str_replace('\*', '\w+?', preg_quote($word, '#')); $word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word); $highlight_match .= (($highlight_match != '' && $word != '') ? '|' : '') . $word; |
