diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:34 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:34 +0100 |
| commit | 07633a66e8c9bbb2b288a286bfbea6f562eeca4d (patch) | |
| tree | a255efa70ed6f202542649148c0445445504d181 /phpBB/includes/bbcode.php | |
| parent | ee82970d96e0a6772b24c48aab8ebd1888ec5216 (diff) | |
| parent | 5cfa0ec0c32ddc424f9651d8766db3e4ced59f96 (diff) | |
| download | forums-07633a66e8c9bbb2b288a286bfbea6f562eeca4d.tar forums-07633a66e8c9bbb2b288a286bfbea6f562eeca4d.tar.gz forums-07633a66e8c9bbb2b288a286bfbea6f562eeca4d.tar.bz2 forums-07633a66e8c9bbb2b288a286bfbea6f562eeca4d.tar.xz forums-07633a66e8c9bbb2b288a286bfbea6f562eeca4d.zip | |
Merge commit 'release-3.0-B3'
Diffstat (limited to 'phpBB/includes/bbcode.php')
| -rw-r--r-- | phpBB/includes/bbcode.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 7293f07dc9..409aab18e4 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -155,6 +155,12 @@ class bbcode while ($row = $db->sql_fetchrow($result)) { + // To circumvent replacing newlines with <br /> 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']); + $rowset[$row['bbcode_id']] = $row; } $db->sql_freeresult($result); @@ -530,7 +536,7 @@ class bbcode $username = str_replace('\"', '"', $username); // remove newline at the beginning - if ($quote{0} == "\n") + if ($quote[0] == "\n") { $quote = substr($quote, 1); } @@ -566,7 +572,7 @@ class bbcode $code = str_replace(' ', ' ', $code); // remove newline at the beginning - if (!empty($code) && $code{0} == "\n") + if (!empty($code) && $code[0] == "\n") { $code = substr($code, 1); } |
