diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php b/rainloop/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php index 9fbd1dcc3..2263568a9 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php @@ -484,7 +484,7 @@ class HtmlUtils { $oElement->setAttribute('src', 'javascript:false'); } - + if (\in_array($sTagNameLower, array('a', 'form', 'area'))) { $oElement->setAttribute('target', '_blank'); @@ -507,6 +507,16 @@ class HtmlUtils @$oElement->removeAttribute('data-bind'); @$oElement->removeAttribute('xmlns'); + if ($oElement->hasAttribute('href')) + { + $sHref = \trim($oElement->getAttribute('href')); + if (!\preg_match('/^(http[s]?|ftp|skype|mailto):/i', $sHref)) + { + $oElement->setAttribute('data-x-broken-href', $sHref); + $oElement->setAttribute('href', 'javascript:false'); + } + } + if ($oElement->hasAttribute('src')) { $sSrc = \trim($oElement->getAttribute('src'));