mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-02 16:18:53 +00:00
[ticket/8937] Keep space characters in front of [code] bbcode content
PHPBB3-8937
This commit is contained in:
parent
13ca659f1f
commit
627e2644a2
1 changed files with 7 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue