Skip to content

best way to save what you love

url: always strip username, password, port, fragment

dumbmoron18a3c06a9eb3
diff --git a/src/modules/processing/url.js b/src/modules/processing/url.js
index a7f35f2d..246d9620 100644
--- a/src/modules/processing/url.js
+++ b/src/modules/processing/url.js
@@ -60,9 +60,11 @@ export function cleanURL(url) {
}
if (stripQuery) {
- url.search = url.hash = ''
+ url.search = ''
}
+ url.username = url.password = url.port = url.hash = ''
+
if (url.pathname.endsWith('/'))
url.pathname = url.pathname.slice(0, -1);