From bf68275f341f619d98191770fa70cbd0f380d9f7 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 16 May 2026 12:37:05 -0400 Subject: [PATCH] Fix image URL validation to require absolute HTTP(S) URLs --- src/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 139a9c9..7a5f01c 100644 --- a/src/index.html +++ b/src/index.html @@ -2592,7 +2592,10 @@ function normalizeImageUrl(raw) { const value = String(raw || '').trim(); if (!value) throw new Error('Enter an image URL.'); - const parsed = new URL(value, window.location.href); + if (!/^https?:\/\//i.test(value)) { + throw new Error('Use a full http or https image URL.'); + } + const parsed = new URL(value); if (!['http:', 'https:'].includes(parsed.protocol)) { throw new Error('Use an http or https image URL.'); }