From d88f98c22634b38a36ffb297a18ebbeb6d3c50f2 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 24 Mar 2021 09:58:48 +0000 Subject: [PATCH] [Basilisk] 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/application/basilisk/components/search/service/nsSearchService.js b/application/basilisk/components/search/service/nsSearchService.js index 100905150c..3cd2531006 100644 --- a/application/basilisk/components/search/service/nsSearchService.js +++ b/application/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));