From 0fdea66654eef3bd15c9eea66e6cccffa89eb78b Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Mon, 17 Jun 2024 19:54:15 -0700 Subject: [PATCH] remove previous optimization that auto-added 'https://' prefix to search queries, which resulted in 'urn:' resources not being searchable also caused unintuitive behavior, where 'ht' would show no results while 'http' would, now fixed --- src/url-resources.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/url-resources.ts b/src/url-resources.ts index 369ec2b9..c0f21036 100644 --- a/src/url-resources.ts +++ b/src/url-resources.ts @@ -163,13 +163,13 @@ class URLResources extends LitElement { } this.loading = true; - let url = this.urlSearchType !== "contains" ? this.query : ""; + const url = this.urlSearchType !== "contains" ? this.query : ""; const prefix = url && this.urlSearchType === "prefix" ? 1 : 0; - // optimization: if not starting with http, likely won't have a match here, so just add https:// - if (url && !url.startsWith("http")) { - url = "https://" + url; - } + // optimization: if not starting with http or urn:, likely won't have a match here, so just add https:// + // if (url && !url.startsWith("http") && !url.startsWith("urn:")) { + // url = "https://" + url; + // } const mime = this.currMime;