]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Avoid error messages because of an already used function
authorMichael Vogel <icarus@dabo.de>
Fri, 13 Nov 2015 22:55:01 +0000 (23:55 +0100)
committerMichael Vogel <icarus@dabo.de>
Fri, 13 Nov 2015 22:55:01 +0000 (23:55 +0100)
include/html2bbcode.php

index 736150134000cc6424812c7e12a6f74c84e39a76..28e251aee4e82425a0fd0c88574558c43f701dd7 100644 (file)
@@ -85,15 +85,15 @@ function deletenode(&$doc, $node)
                $child->parentNode->removeChild($child);
 }}
 
+function _replace_code_cb($m){
+       return "<code>".str_replace("\n","<br>\n",$m[1]). "</code>";
+}
+
 function html2bbcode($message)
 {
 
        $message = str_replace("\r", "", $message);
 
-       function _replace_code_cb($m){
-               return "<code>".str_replace("\n","<br>\n",$m[1]). "</code>";
-       }
-       
        $message = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", "_replace_code_cb", $message);
 
        $message = str_replace(array(