diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-07 16:30:32 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-07 16:30:32 -0400 |
commit | e81c7a788af7abb8053c5b83d94a83e08fdf5c06 (patch) | |
tree | 523c84ee4c6526ed354a4b32fad4ae3885d015d7 /phpBB/includes/bbcode.php | |
parent | 88eb822126fd15c08794d6e3fb760d854c824475 (diff) | |
parent | eb4660f4ef455d3ce6b5a24db2dae52ddc095133 (diff) | |
download | forums-e81c7a788af7abb8053c5b83d94a83e08fdf5c06.tar forums-e81c7a788af7abb8053c5b83d94a83e08fdf5c06.tar.gz forums-e81c7a788af7abb8053c5b83d94a83e08fdf5c06.tar.bz2 forums-e81c7a788af7abb8053c5b83d94a83e08fdf5c06.tar.xz forums-e81c7a788af7abb8053c5b83d94a83e08fdf5c06.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/8937] Keep space characters in front of [code] bbcode content
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r-- | phpBB/includes/bbcode.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index a360bcd5d1..4d064a838b 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -584,6 +584,13 @@ class bbcode $code = str_replace("\t", ' ', $code); $code = str_replace(' ', ' ', $code); $code = str_replace(' ', ' ', $code); + $code = str_replace("\n ", "\n ", $code); + + // keep space at the beginning + if (!empty($code) && $code[0] == ' ') + { + $code = ' ' . substr($code, 1); + } // remove newline at the beginning if (!empty($code) && $code[0] == "\n") |