X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2bbcode.php;h=28e251aee4e82425a0fd0c88574558c43f701dd7;hb=51d392b97f144a7487deb35d8cb7d0946fe9fbc9;hp=d2699460e31a43ace5fdcd60b8dd9f5c6d7b3d4c;hpb=35f623ae4f82ac8167ad98b38fab39e449ffa1ea;p=friendica.git
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index d2699460e3..28e251aee4 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -85,17 +85,25 @@ function deletenode(&$doc, $node)
$child->parentNode->removeChild($child);
}}
+function _replace_code_cb($m){
+ return "".str_replace("\n","
";
+}
+
function html2bbcode($message)
{
$message = str_replace("\r", "", $message);
+ $message = preg_replace_callback("|
\n",$m[1]). "
([^<]*)
|ism", "_replace_code_cb", $message);
+
$message = str_replace(array(
"", - "