Bugfix: undefined ClearBodyAndHtmlTag

This commit is contained in:
the-djmaze 2022-02-03 16:51:51 +01:00
parent 0dffa549be
commit aa276c04c0

View file

@ -72,14 +72,13 @@ abstract class HtmlUtils
'/<\?xml [^>]*\?>/i'
), '', $sText);
$sHtmlAttrs = $sBodyAttrs = '';
$sText = static::ClearBodyAndHtmlTag($sText, $sHtmlAttrs, $sBodyAttrs);
$sHtmlAttrs = '';
$aMatch = array();
if (\preg_match('/<html([^>]+)>/im', $sText, $aMatch) && !empty($aMatch[1])) {
$sHtmlAttrs = $aMatch[1];
}
$sBodyAttrs = '';
$aMatch = array();
if (\preg_match('/<body([^>]+)>/im', $sText, $aMatch) && !empty($aMatch[1])) {
$sBodyAttrs = $aMatch[1];