1
0
Fork 0

Merge pull request #2072 from fabrixxm/issue_2066

Remove anonymous function, 5.2 is still minimal requirement
This commit is contained in:
Tobias Diekershoff 2015-11-13 12:51:17 +01:00
commit a552845d8f

View file

@ -90,9 +90,11 @@ function html2bbcode($message)
$message = str_replace("\r", "", $message);
$message = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", function($m) {
function _replace_code_cb($m){
return "<code>".str_replace("\n","<br>\n",$m[1]). "</code>";
}, $message);
}
$message = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", "_replace_code_cb", $message);
$message = str_replace(array(
"<li><p>",