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/includes/ucp | |
| 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/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_attachments.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index 895cb51020..b20e4a55ed 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -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'], diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b980774403..492ce08b45 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -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); } |
