From a841d162e280a8a5c93b09cec28633cc91162eaa Mon Sep 17 00:00:00 2001 From: Vic Date: Sat, 11 Apr 2026 12:02:23 +0200 Subject: [PATCH] treat spaceless queries with a trailing / as hostnames --- lib/url_utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/url_utils.js b/lib/url_utils.js index 2a1a13700..ef3e025f4 100644 --- a/lib/url_utils.js +++ b/lib/url_utils.js @@ -83,6 +83,9 @@ const UrlUtils = { // Allow IPv4 addresses if (/^(\d{1,3}\.){3}\d{1,3}$/.test(hostName)) return true; + // Identify as URL if it ends with a '/' (we already checked it has no spaces) + if (str.endsWith("/")) return true; + // Fallback: no URL return false; },