summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-03-24 09:58:48 +0000
committerMoonchild <moonchild@palemoon.org>2021-03-24 09:58:48 +0000
commitcf582a3d2512e5cd0bc2ae5cfe758d0bacac603f (patch)
tree3fd651687bcec7694943e38e1539f9a8acc2c172
parente056a306028c5cdc5db6d61a939ce1f2afe74117 (diff)
downloadbasilisk-cf582a3d2512e5cd0bc2ae5cfe758d0bacac603f.tar.gz
[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.
-rw-r--r--basilisk/components/search/service/nsSearchService.js8
1 files 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));