From a48c451d6cdec1415045f5e4829534fb3c0d22c5 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Tue, 12 Oct 2021 18:21:17 +0100 Subject: [PATCH] Restrict autolinks to https --- src/Components/Inlines/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Inlines/Url.php b/src/Components/Inlines/Url.php index 8a84492..396f4f3 100644 --- a/src/Components/Inlines/Url.php +++ b/src/Components/Inlines/Url.php @@ -14,7 +14,7 @@ final class Url implements BacktrackingInline { use WidthTrait; - private const ABSOLUTE_URI = '[a-z][a-z0-9+.-]{1,31}:[^\s[:cntrl:]<>]*'; + private const URI = 'https?+:[^\s[:cntrl:]<>]*'; private const NO_TRAILING_PUNCT = '(?context(), $matches, \PREG_OFFSET_CAPTURE