mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +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:
@@ -121,7 +121,7 @@ class ucp_attachments
|
||||
$template->assign_block_vars('attachrow', array(
|
||||
'ROW_NUMBER' => $row_count + ($start + 1),
|
||||
'FILENAME' => $row['real_filename'],
|
||||
'COMMENT' => str_replace("\n", '<br />', $row['attach_comment']),
|
||||
'COMMENT' => bbcode_nl2br($row['attach_comment']),
|
||||
'EXTENSION' => $row['extension'],
|
||||
'SIZE' => ($row['filesize'] >= 1048576) ? ($row['filesize'] >> 20) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? ($row['filesize'] >> 10) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']),
|
||||
'DOWNLOAD_COUNT' => $row['download_count'],
|
||||
|
@@ -56,8 +56,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
$user_info = get_user_information($author_id, $message_row);
|
||||
|
||||
// Parse the message and subject
|
||||
$message = $message_row['message_text'];
|
||||
$message = str_replace("\n", '<br />', censor_text($message));
|
||||
$message = censor_text($message_row['message_text']);
|
||||
|
||||
// Second parse bbcode here
|
||||
if ($message_row['bbcode_bitfield'])
|
||||
@@ -66,6 +65,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
}
|
||||
|
||||
// Always process smilies after parsing bbcodes
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
@@ -142,7 +142,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
if ($signature)
|
||||
{
|
||||
$signature = censor_text($signature);
|
||||
$signature = str_replace("\n", '<br />', censor_text($signature));
|
||||
|
||||
if ($user_info['user_sig_bbcode_bitfield'])
|
||||
{
|
||||
@@ -155,6 +154,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$signature = bbcode_nl2br($signature);
|
||||
$signature = smiley_text($signature);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user