mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/8937] Keep space characters in front of [code] bbcode content
This commit is contained in:
commit
e81c7a788a
1 changed files with 7 additions and 0 deletions
|
@ -584,6 +584,13 @@ class bbcode
|
||||||
$code = str_replace("\t", ' ', $code);
|
$code = str_replace("\t", ' ', $code);
|
||||||
$code = str_replace(' ', ' ', $code);
|
$code = str_replace(' ', ' ', $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
|
// remove newline at the beginning
|
||||||
if (!empty($code) && $code[0] == "\n")
|
if (!empty($code) && $code[0] == "\n")
|
||||||
|
|
Loading…
Add table
Reference in a new issue