mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Attachments control panel
This commit is contained in:
parent
1d943356f5
commit
af2815cd61
21 changed files with 239 additions and 18 deletions
|
|
@ -566,15 +566,15 @@ class HtmlUtils
|
|||
if ($oElement->hasAttribute('href'))
|
||||
{
|
||||
$sHref = \trim($oElement->getAttribute('href'));
|
||||
if (!\preg_match('/^(http[s]?|ftp|skype|mailto):/i', $sHref) ||
|
||||
'//' !== \substr($sHref, 0, 2))
|
||||
if (!\preg_match('/^(http[s]?|ftp|skype|mailto):/i', $sHref) && '//' !== \substr($sHref, 0, 2))
|
||||
{
|
||||
$oElement->setAttribute('data-x-broken-href', $sHref);
|
||||
$oElement->setAttribute('href', 'javascript:false');
|
||||
}
|
||||
else if ('a' === $sTagNameLower)
|
||||
|
||||
if ('a' === $sTagNameLower)
|
||||
{
|
||||
$oElement->setAttribute('rel', 'external');
|
||||
$oElement->setAttribute('rel', 'external nofollow');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -595,8 +595,7 @@ class HtmlUtils
|
|||
}
|
||||
else
|
||||
{
|
||||
if (\preg_match('/^http[s]?:\/\//i', $sSrc) ||
|
||||
'//' === \substr($sSrc, 0, 2))
|
||||
if (\preg_match('/^http[s]?:\/\//i', $sSrc) || '//' === \substr($sSrc, 0, 2))
|
||||
{
|
||||
if ($bDoNotReplaceExternalUrl)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue