mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improved aAttrsForRemove handling
This commit is contained in:
parent
239c7c28fb
commit
bfc8524876
1 changed files with 3 additions and 9 deletions
|
|
@ -513,8 +513,7 @@ abstract class HtmlUtils
|
||||||
|
|
||||||
else if ('table' === $sTagNameLower && $oElement->hasAttribute('width'))
|
else if ('table' === $sTagNameLower && $oElement->hasAttribute('width'))
|
||||||
{
|
{
|
||||||
@$oElement->removeAttribute('width');
|
$aAttrsForRemove[] = 'width';
|
||||||
$aAttrsForRemove['width'] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($oElement->hasAttributes() && isset($oElement->attributes) && $oElement->attributes)
|
if ($oElement->hasAttributes() && isset($oElement->attributes) && $oElement->attributes)
|
||||||
|
|
@ -538,7 +537,7 @@ abstract class HtmlUtils
|
||||||
'fscommand', 'seeksegmenttime'
|
'fscommand', 'seeksegmenttime'
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
$aAttrsForRemove[$sName] = true;
|
$aAttrsForRemove[] = $sAttrName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -705,12 +704,7 @@ abstract class HtmlUtils
|
||||||
|
|
||||||
if (\MailSo\Config::$HtmlStrictDebug && $aAttrsForRemove)
|
if (\MailSo\Config::$HtmlStrictDebug && $aAttrsForRemove)
|
||||||
{
|
{
|
||||||
unset($aAttrsForRemove['class'], $aAttrsForRemove['target'], $aAttrsForRemove['id'], $aAttrsForRemove['name'],
|
$oElement->setAttribute('data-removed-attrs', \implode(',', $aAttrsForRemove));
|
||||||
$aAttrsForRemove['itemprop'], $aAttrsForRemove['itemscope'], $aAttrsForRemove['itemtype']);
|
|
||||||
if ($aAttrsForRemove)
|
|
||||||
{
|
|
||||||
$oElement->setAttribute('data-removed-attrs', \implode(',', \array_keys($aAttrsForRemove)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue