From 491f55c7bd86917ec79d2ebef6a46be3c213f70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Rudner?= Date: Fri, 1 Aug 2025 15:27:37 +0200 Subject: [PATCH] :bug: Allow @ as part of url (#729) --- core/attributedef.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index cce290954..231d48ca3 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -8165,7 +8165,7 @@ class AttributeURL extends AttributeString * @since 3.0.3 moved from Config to AttributeURL constant */ public const DEFAULT_VALIDATION_PATTERN = /** @lang RegExp */ - '(https?|ftp)\://([a-zA-Z0-9+!*(),;?&=\$_.-]+(\:[a-zA-Z0-9+!*(),;?&=\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\:[0-9]{2,5})?(/([a-zA-Z0-9:%+\$_-]\.?)+)*/?(\?[a-zA-Z+&\$_.-][a-zA-Z0-9;:[\]@&%=+/\$_.,-]*)?(#[a-zA-Z0-9_.-][a-zA-Z0-9+\$_.-]*)?'; + '(https?|ftp)\://([a-zA-Z0-9+!*(),;?&=\$_.-]+(\:[a-zA-Z0-9+!*(),;?&=\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\:[0-9]{2,5})?(/([a-zA-Z0-9:%@+\$_-]\.?)+)*/?(\?[a-zA-Z+&\$_.-][a-zA-Z0-9;:[\]@&%=+/\$_.,-]*)?(#[a-zA-Z0-9_.-][a-zA-Z0-9+\$_.-]*)?'; /** * Useless constructor, but if not present PHP 7.4.0/7.4.1 is crashing :( (N°2329)