Attachments control panel

This commit is contained in:
RainLoop Team 2015-04-11 01:52:15 +04:00
parent 1d943356f5
commit af2815cd61
21 changed files with 239 additions and 18 deletions

View file

@ -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)
{

View file

@ -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()