mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
fix custom bbcode html replacement to correctly replace references
It failed if there was a number directly after the token, resulting in $12345, where $1 was needed. Fixed by using ${x} also made sure that newlines within the html replacement are not replaced with <br />. git-svn-id: file:///svn/phpbb/trunk@6391 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user