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/mcp/mcp_post.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/includes/mcp/mcp_post.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 698bcc8dd6..32fb572d3f 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -112,13 +112,15 @@ function mcp_post_details($id, $mode, $action) // Process message, leave it uncensored $message = $post_info['post_text']; - $message = str_replace("\n", '<br />', $message); + if ($post_info['bbcode_bitfield']) { include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); $bbcode = new bbcode($post_info['bbcode_bitfield']); $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']); } + + $message = bbcode_nl2br($message); $message = smiley_text($message); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) @@ -261,7 +263,7 @@ function mcp_post_details($id, $mode, $action) 'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) : '', 'USER_NOTIFY' => ($row['user_notify']) ? true : false, 'REPORT_TIME' => $user->format_date($row['report_time']), - 'REPORT_TEXT' => str_replace("\n", '<br />', trim($row['report_text']))) + 'REPORT_TEXT' => bbcode_nl2br(trim($row['report_text'])))) ); } while ($row = $db->sql_fetchrow($result)); |