Remove unused HtmlStrictAllowedTags and HtmlStrictDebug

This commit is contained in:
the-djmaze 2022-03-02 11:30:32 +01:00
parent 1d6dad8f4f
commit 059b9eb322
3 changed files with 1 additions and 17 deletions

View file

@ -204,10 +204,6 @@ abstract class HtmlUtils
$aRemoveTags[] = 'style';
}
$aHtmlAllowedTags = isset(\MailSo\Config::$HtmlStrictAllowedTags) &&
\is_array(\MailSo\Config::$HtmlStrictAllowedTags) && \count(\MailSo\Config::$HtmlStrictAllowedTags) ?
\MailSo\Config::$HtmlStrictAllowedTags : null;
$aRemove = array();
$aNodes = $oDom->getElementsByTagName('*');
foreach ($aNodes as /* @var $oElement \DOMElement */ $oElement)
@ -217,7 +213,7 @@ abstract class HtmlUtils
$sTagNameLower = \trim(\strtolower($oElement->tagName));
if ('' !== $sTagNameLower)
{
if (\in_array($sTagNameLower, $aRemoveTags) || ($aHtmlAllowedTags && !\in_array($sTagNameLower, $aHtmlAllowedTags)))
if (\in_array($sTagNameLower, $aRemoveTags))
{
$aRemove[] = @$oElement;
}

View file

@ -16,16 +16,6 @@ namespace MailSo;
*/
class Config
{
/**
* @var array|null
*/
public static $HtmlStrictAllowedTags = null;
/**
* @var boolean
*/
public static $HtmlStrictDebug = false;
/**
* @var int
*/

View file

@ -115,8 +115,6 @@ class Api
});
}
\MailSo\Config::$HtmlStrictDebug = !!static::Config()->Get('debug', 'enable', false);
\MailSo\Config::$CheckNewMessages = !!static::Config()->Get('labs', 'check_new_messages', true);
}
}