From cf582a3d2512e5cd0bc2ae5cfe758d0bacac603f Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 24 Mar 2021 09:58:48 +0000 Subject: [search] Don't try to force x-icon image type for search engine icon. If it's not actually an image, then throw a warning in the console and bail. --- basilisk/components/search/service/nsSearchService.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/basilisk/components/search/service/nsSearchService.js b/basilisk/components/search/service/nsSearchService.js index 1009051..3cd2531 100644 --- a/basilisk/components/search/service/nsSearchService.js +++ b/basilisk/components/search/service/nsSearchService.js @@ -1371,8 +1371,12 @@ Engine.prototype = { } let type = chan.contentType; - if (!type.startsWith("image/")) - type = "image/x-icon"; + if (!type.startsWith("image/")) { + console.warn( + "Search service: Unable to set icon, content type is not an image", + contentType); + return; + } let dataURL = "data:" + type + ";base64," + btoa(String.fromCharCode.apply(null, aByteArray)); -- cgit v1.2.3