Parcourir la source

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

AntonLV il y a 2 ans
Parent
commit
4d7554bf2a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      inc/utils.inc.php

+ 1 - 1
inc/utils.inc.php

@@ -236,7 +236,7 @@ function bx_process_output ($mixedData, $iDataType = BX_DATA_TEXT, $mixedParams
         $s = bx_linkify_html($mixedData, 'class="' . BX_DOL_LINK_CLASS . '"');
 
         // 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('/<([a-z]+)(?:\s[^>]*)?>((?:\s|<br\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: