Przeglądaj źródła

Ticket #4827 - Comments with 'b' or 'r' is displayed empty.

AntonLV 2 lat temu
rodzic
commit
15e5bf3fdd
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      inc/utils.inc.php

+ 2 - 2
inc/utils.inc.php

@@ -235,8 +235,8 @@ function bx_process_output ($mixedData, $iDataType = BX_DATA_TEXT, $mixedParams
     case BX_DATA_HTML:
         $s = bx_linkify_html($mixedData, 'class="' . BX_DOL_LINK_CLASS . '"');
 
-        // remove empty tags from html content #4203 and #4486
-        $s = preg_replace("/(((<[^\/(br)>]*>)+[ \n(<br\s*\/*>)]*(<\/[^>]+>)+)+)/", '', $s);
+        // remove empty tags from html content: #4203, #4486, #4827
+        $s = preg_replace("/<([a-z]+)(?:\s[^>]*)?>\s*(?:<br\s*\/?>\s*)*\s*<\/\1>/i", '', $s);
         $s = preg_replace('/(<br\s*\/?>\s*){2,}/i', '<br>', $s);
         return $mixedParams && is_array($mixedParams) && in_array('no_process_macro', $mixedParams) ? $s : bx_process_macros($s);
     case BX_DATA_TEXT_MULTILINE: