1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 15:01:33 +02:00

- 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
This commit is contained in:
Nils Adermann
2007-08-19 13:40:53 +00:00
parent b8b85e5aca
commit d104d3d969
19 changed files with 57 additions and 45 deletions

View File

@@ -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)