From e1774acbde8ba70bd5ef2893ddddb7091ef84433 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 13 Nov 2015 23:55:01 +0100 Subject: [PATCH] Bugfix: Avoid error messages because of an already used function --- include/html2bbcode.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 736150134..28e251aee 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -85,15 +85,15 @@ function deletenode(&$doc, $node) $child->parentNode->removeChild($child); }} +function _replace_code_cb($m){ + return "".str_replace("\n","
\n",$m[1]). "
"; +} + function html2bbcode($message) { $message = str_replace("\r", "", $message); - function _replace_code_cb($m){ - return "".str_replace("\n","
\n",$m[1]). "
"; - } - $message = preg_replace_callback("|
([^<]*)
|ism", "_replace_code_cb", $message); $message = str_replace(array(