]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / include / bbcode.php
index 228b75d5abbd711dc26afdfce0492ef300ddcfa9..613c2b7db06eec5787d51d893f7d57a66c144ad4 100644 (file)
@@ -617,7 +617,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
        // Clean up the HTML by loading and saving the HTML with the DOM
        // Only do it when it has to be done - for performance reasons
-       if (!$tryoembed) {
+       // Update: Now it is done every time - since bad structured html can break a whole page
+       //if (!$tryoembed) {
                $doc = new DOMDocument();
                $doc->preserveWhiteSpace = false;
 
@@ -632,7 +633,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
                $Text = str_replace('<br></li>','</li>', $Text);
 
                $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
-       }
+       //}
 
        call_hooks('bbcode',$Text);