mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
Remove unused HtmlStrictAllowedTags and HtmlStrictDebug
This commit is contained in:
parent
1d6dad8f4f
commit
059b9eb322
3 changed files with 1 additions and 17 deletions
|
|
@ -204,10 +204,6 @@ abstract class HtmlUtils
|
||||||
$aRemoveTags[] = 'style';
|
$aRemoveTags[] = 'style';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aHtmlAllowedTags = isset(\MailSo\Config::$HtmlStrictAllowedTags) &&
|
|
||||||
\is_array(\MailSo\Config::$HtmlStrictAllowedTags) && \count(\MailSo\Config::$HtmlStrictAllowedTags) ?
|
|
||||||
\MailSo\Config::$HtmlStrictAllowedTags : null;
|
|
||||||
|
|
||||||
$aRemove = array();
|
$aRemove = array();
|
||||||
$aNodes = $oDom->getElementsByTagName('*');
|
$aNodes = $oDom->getElementsByTagName('*');
|
||||||
foreach ($aNodes as /* @var $oElement \DOMElement */ $oElement)
|
foreach ($aNodes as /* @var $oElement \DOMElement */ $oElement)
|
||||||
|
|
@ -217,7 +213,7 @@ abstract class HtmlUtils
|
||||||
$sTagNameLower = \trim(\strtolower($oElement->tagName));
|
$sTagNameLower = \trim(\strtolower($oElement->tagName));
|
||||||
if ('' !== $sTagNameLower)
|
if ('' !== $sTagNameLower)
|
||||||
{
|
{
|
||||||
if (\in_array($sTagNameLower, $aRemoveTags) || ($aHtmlAllowedTags && !\in_array($sTagNameLower, $aHtmlAllowedTags)))
|
if (\in_array($sTagNameLower, $aRemoveTags))
|
||||||
{
|
{
|
||||||
$aRemove[] = @$oElement;
|
$aRemove[] = @$oElement;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,16 +16,6 @@ namespace MailSo;
|
||||||
*/
|
*/
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var array|null
|
|
||||||
*/
|
|
||||||
public static $HtmlStrictAllowedTags = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean
|
|
||||||
*/
|
|
||||||
public static $HtmlStrictDebug = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -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);
|
\MailSo\Config::$CheckNewMessages = !!static::Config()->Get('labs', 'check_new_messages', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue