X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2bbcode.php;h=650bbdcae8c07d1071a6724463b4ef0f227809df;hb=9851965090184df4a138a0f9f4342adb61d07a4e;hp=6e9532c92f5bf462461b600facc085b5489f2e97;hpb=64946972b2004b0b8252da670d0e990143a40b77;p=friendica.git diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 6e9532c92f..650bbdcae8 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) { @@ -76,13 +76,14 @@ function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb) return($replace); } +if(!function_exists('deletenode')) { function deletenode(&$doc, $node) { $xpath = new DomXPath($doc); $list = $xpath->query("//".$node); foreach ($list as $child) $child->parentNode->removeChild($child); -} +}} function html2bbcode($message) {