From ba35ec923e87382e013f52c74848794d5640f330 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Thu, 14 Dec 2023 23:14:22 +0000 Subject: [PATCH] url: re-parse hostname after validating --- src/modules/processing/url.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/processing/url.js b/src/modules/processing/url.js index 0420a465..ab995b72 100644 --- a/src/modules/processing/url.js +++ b/src/modules/processing/url.js @@ -48,11 +48,12 @@ export function aliasURL(url) { break; } - return { url, host: host.sld } + return url } -export function cleanURL({ url, host }) { +export function cleanURL(url) { assert(url instanceof URL); + const host = psl.parse(url.hostname).sld; let stripQuery = true; if (host === 'pinterest') {