mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1315,6 +1315,7 @@ class Actions
|
|||
'AllowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false),
|
||||
'MaterialDesign' => (bool) $oConfig->Get('labs', 'use_material_design', true),
|
||||
'PremType' => $this->PremType(),
|
||||
'ZipSupported' => !!\class_exists('ZipArchive'),
|
||||
'Admin' => array(),
|
||||
'Capa' => array(),
|
||||
'Plugins' => array()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue