X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FHTML.php;h=89a680501f1674761d0c394cf1bc17799a50a6b5;hb=a8402109b183e81dad4e5443883dd292df094b86;hp=c65e1d9820368d488f595aefb8e0f297a42d1a52;hpb=5e2b655b43f5a74e249d9c069a44cf50ab5e5162;p=friendica.git diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index c65e1d9820..89a680501f 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -281,9 +281,9 @@ class HTML self::tagToBBCode($doc, 'div', [], "\r", "\r"); self::tagToBBCode($doc, 'p', [], "\n", "\n"); - self::tagToBBCode($doc, 'ul', [], "[list]", "[/list]"); - self::tagToBBCode($doc, 'ol', [], "[list=1]", "[/list]"); - self::tagToBBCode($doc, 'li', [], "[*]", ""); + self::tagToBBCode($doc, 'ul', [], "[ul]", "\n[/ul]"); + self::tagToBBCode($doc, 'ol', [], "[ol]", "\n[/ol]"); + self::tagToBBCode($doc, 'li', [], "\n[li]", "[/li]"); self::tagToBBCode($doc, 'hr', [], "[hr]", ""); @@ -349,33 +349,6 @@ class HTML $message = str_replace("\n\n\n", "\n\n", $message); } while ($oldmessage != $message); - do { - $oldmessage = $message; - $message = str_replace( - [ - "[/size]\n\n", - "\n[hr]", - "[hr]\n", - "\n[list", - "[/list]\n", - "\n[/", - "[list]\n", - "[list=1]\n", - "\n[*]"], - [ - "[/size]\n", - "[hr]", - "[hr]", - "[list", - "[/list]", - "[/", - "[list]", - "[list=1]", - "[*]"], - $message - ); - } while ($message != $oldmessage); - $message = str_replace( ['[b][b]', '[/b][/b]', '[i][i]', '[/i][/i]'], ['[b]', '[/b]', '[i]', '[/i]'], @@ -1032,7 +1005,7 @@ class HTML // the quotes, e.g.: // // concat("'foo'", '"', "bar") - return 'concat(' . implode(', \'"\', ', array_map(['self', 'xpathQuote'], explode('"', $value))) . ')'; + return 'concat(' . implode(', \'"\', ', array_map([self::class, 'xpathQuote'], explode('"', $value))) . ')'; } /**