From 59565275b16463d5e6be371d0aca951c8d6f5ce1 Mon Sep 17 00:00:00 2001 From: djmaze Date: Tue, 9 Mar 2021 14:50:43 +0100 Subject: [PATCH] Bugfix: allow any 'scheme:' uri --- snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php index 5b9990d03..a965bc0f6 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Base/HtmlUtils.php @@ -710,7 +710,7 @@ abstract 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('/^([a-z]+):/i', $sHref) && '//' !== \substr($sHref, 0, 2)) { $oElement->setAttribute('data-x-broken-href', $sHref); $oElement->setAttribute('href', 'javascript:false');