I'm speechless. This is just reckless. Set a context flag in text using a context trigger character which is likely to be present in that text already. Without escaping any previous instances of that character. Grrr.
This commit is contained in:
parent
f524fb1f20
commit
34781433c1
@ -16,7 +16,7 @@ function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb)
|
||||
|
||||
function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
|
||||
{
|
||||
$savestart = str_replace('$', '%', $startbb);
|
||||
$savestart = str_replace('$', '\x01', $startbb);
|
||||
$replace = false;
|
||||
|
||||
$xpath = new DomXPath($doc);
|
||||
@ -37,7 +37,7 @@ function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
|
||||
|
||||
foreach ($attributes as $attribute => $value) {
|
||||
|
||||
$startbb = str_replace('%'.++$i, '$1', $startbb);
|
||||
$startbb = str_replace('\x01'.++$i, '$1', $startbb);
|
||||
|
||||
if (strpos('*'.$startbb, '$1') > 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user