From: Michael Vogel Date: Thu, 1 Jan 2015 20:19:07 +0000 (+0100) Subject: Using a better placeholder. Could solve this issue: https://github.com/friendica... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1520a3feab599bd0f93dd738041d12ec78735310;p=friendica.git Using a better placeholder. Could solve this issue: https://github.com/friendica/friendica/issues/920 --- diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 6e9532c92f..1b940d9497 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -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) {