mirror of
https://github.com/friendica/friendica
synced 2024-11-13 03:02:53 +00:00
Merge pull request #2075 from annando/1511-bugfix-bbcode
Bugfix: Avoid error messages because of an already used function
This commit is contained in:
commit
83cb32d637
1 changed files with 4 additions and 4 deletions
|
@ -85,15 +85,15 @@ function deletenode(&$doc, $node)
|
||||||
$child->parentNode->removeChild($child);
|
$child->parentNode->removeChild($child);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
function _replace_code_cb($m){
|
||||||
|
return "<code>".str_replace("\n","<br>\n",$m[1]). "</code>";
|
||||||
|
}
|
||||||
|
|
||||||
function html2bbcode($message)
|
function html2bbcode($message)
|
||||||
{
|
{
|
||||||
|
|
||||||
$message = str_replace("\r", "", $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 = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", "_replace_code_cb", $message);
|
||||||
|
|
||||||
$message = str_replace(array(
|
$message = str_replace(array(
|
||||||
|
|
Loading…
Reference in a new issue