diff options
author | Nils Adermann <naderman@naderman.de> | 2007-08-19 13:40:53 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2007-08-19 13:40:53 +0000 |
commit | d104d3d969d2fbc77f1004e0e5369e8c0c15738f (patch) | |
tree | 188b373ce8876398477e517f242a29ae72cab23e /phpBB/search.php | |
parent | b8b85e5aca616c1e4b43246daa97a11881fb218d (diff) | |
download | forums-d104d3d969d2fbc77f1004e0e5369e8c0c15738f.tar forums-d104d3d969d2fbc77f1004e0e5369e8c0c15738f.tar.gz forums-d104d3d969d2fbc77f1004e0e5369e8c0c15738f.tar.bz2 forums-d104d3d969d2fbc77f1004e0e5369e8c0c15738f.tar.xz forums-d104d3d969d2fbc77f1004e0e5369e8c0c15738f.zip |
- BBCode parsing order should ALWAYS be censor_text(), bbcode_secon_pass(), bbcode_nl2br(), smiley_text(), parse_attachments()
- using \r on custom bbcodes to allow line breaks [Bug #10758]
git-svn-id: file:///svn/phpbb/trunk@8050 89ea8834-ac86-4346-8a33-228a782c2dd0
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) |