From c965bc38d1a24441e8f2acfcd509554e75e51b43 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 30 Oct 2023 19:30:51 +0100 Subject: [PATCH] https://github.com/C9Glax/tranga-website/issues/19 Wrong regex for URLs with ports --- Tranga/GlobalBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/GlobalBase.cs b/Tranga/GlobalBase.cs index 147327d..e9c68d0 100644 --- a/Tranga/GlobalBase.cs +++ b/Tranga/GlobalBase.cs @@ -15,7 +15,7 @@ public abstract class GlobalBase protected HashSet libraryConnectors { get; init; } protected List cachedPublications { get; init; } public static readonly NumberFormatInfo numberFormatDecimalPoint = new (){ NumberDecimalSeparator = "." }; - protected static readonly Regex baseUrlRex = new(@"https?:\/\/[0-9A-z\.-]*"); + protected static readonly Regex baseUrlRex = new(@"https?:\/\/[0-9A-z\.-]+(:[0-9]+)?"); protected GlobalBase(GlobalBase clone) {