diff options
Diffstat (limited to 'phpBB/search.php')
-rw-r--r-- | phpBB/search.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index d9010b73a8..9acad880d2 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -838,18 +838,19 @@ if ($keywords || $author || $author_id || $search_id || $submit) { // now find context for the searched words $row['post_text'] = get_context($row['post_text'], array_filter(explode('|', $hilit), 'strlen'), $return_chars); - $row['post_text'] = str_replace("\n", '<br />', $row['post_text']); + $row['post_text'] = bbcode_nl2br($row['post_text']); } else { - $row['post_text'] = str_replace("\n", '<br />', $row['post_text']); - // Second parse bbcode here if ($row['bbcode_bitfield']) { $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']); } + $row['post_text'] = bbcode_nl2br($row['post_text']); + $row['post_text'] = smiley_text($row['post_text']); + if (!empty($attachments[$row['post_id']])) { parse_attachments($forum_id, $row['post_text'], $attachments[$row['post_id']], $update_count); @@ -857,9 +858,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) // we only display inline attachments unset($attachments[$row['post_id']]); } - - // Always process smilies after parsing bbcodes - $row['post_text'] = smiley_text($row['post_text']); } if ($hilit) |