summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bg/RequestUtil.js2
-rw-r--r--src/lib/ContentMetaData.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bg/RequestUtil.js b/src/bg/RequestUtil.js
index 557293d..2cd15c2 100644
--- a/src/bg/RequestUtil.js
+++ b/src/bg/RequestUtil.js
@@ -1,7 +1,7 @@
'use strict';
{
let NULL = new Uint8Array();
- let DEFAULT_CHARSET = "utf-8";
+
let xmlFeedOrImage = /^(?:(?:application|text)\/(?:(?:r(?:ss|df)|atom)\+)xml(;|$))|image\//i;
let rawXml = /^(?:application|text)\/xml;/i;
let brokenOnLoad;
diff --git a/src/lib/ContentMetaData.js b/src/lib/ContentMetaData.js
index c60d75e..da335ad 100644
--- a/src/lib/ContentMetaData.js
+++ b/src/lib/ContentMetaData.js
@@ -17,12 +17,13 @@ class ContentMetaData {
charset = m[1];
}
}
- Object.defineProperty(this, "charset", { value: charset, writable: false, configurable: true })
+ Object.defineProperty(this, "charset", { value: charset, writable: false, configurable: true });
+ return charset;
}
createDecoder() {
try {
- return new TextDecoder(charset);
+ return new TextDecoder(this.charset);
} catch (e) {
return new TextDecoder(this.defaultCharset);
}