Fix ConvertHtmlToPlain

This commit is contained in:
RainLoop Team 2017-07-05 23:41:40 +03:00
parent d36b563e4b
commit 9188228f5d

View file

@ -1529,8 +1529,6 @@ class HtmlUtils
'/<th[^>]*>(.+?)<\/th>/i', '/<th[^>]*>(.+?)<\/th>/i',
'/&nbsp;/i', '/&nbsp;/i',
'/&quot;/i', '/&quot;/i',
'/&gt;/i',
'/&lt;/i',
'/&amp;/i', '/&amp;/i',
'/&copy;/i', '/&copy;/i',
'/&trade;/i', '/&trade;/i',
@ -1573,8 +1571,6 @@ class HtmlUtils
"\t\\1\n", "\t\\1\n",
' ', ' ',
'"', '"',
'>',
'<',
'&', '&',
'(c)', '(c)',
'(tm)', '(tm)',
@ -1601,6 +1597,14 @@ class HtmlUtils
$sText = \preg_replace("/\n\\s+\n/", "\n", $sText); $sText = \preg_replace("/\n\\s+\n/", "\n", $sText);
$sText = \preg_replace("/[\n]{3,}/", "\n\n", $sText); $sText = \preg_replace("/[\n]{3,}/", "\n\n", $sText);
$sText = \preg_replace(array(
'/&gt;/i',
'/&lt;/i'
), array(
'>',
'<'
), $sText);
return \trim($sText); return \trim($sText);
} }
} }