From d104d3d969d2fbc77f1004e0e5369e8c0c15738f Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 19 Aug 2007 13:40:53 +0000 Subject: - 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 --- phpBB/includes/bbcode.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index e2d8b7cde4..4b8ad62a51 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -156,10 +156,9 @@ class bbcode while ($row = $db->sql_fetchrow($result)) { // To circumvent replacing newlines with
for the generated html, - // we just remove newlines here. We do not do this within the admin panel to - // let the admin lay out his html code nicely - $row['bbcode_tpl'] = str_replace(array("\n", "\r"), '', $row['bbcode_tpl']); - $row['second_pass_replace'] = str_replace(array("\n", "\r"), '', $row['second_pass_replace']); + // we use carriage returns here. They are later changed back to newlines + $row['bbcode_tpl'] = str_replace("\n", "\r", $row['bbcode_tpl']); + $row['second_pass_replace'] = str_replace("\n", "\r", $row['second_pass_replace']); $rowset[$row['bbcode_id']] = $row; } -- cgit v1.2.1