diff options
Diffstat (limited to 'bg')
-rw-r--r-- | bg/ResponseProcessor.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bg/ResponseProcessor.js b/bg/ResponseProcessor.js index e3d6c45..1af8cd7 100644 --- a/bg/ResponseProcessor.js +++ b/bg/ResponseProcessor.js @@ -101,8 +101,9 @@ class ResponseTextFilter { } catch(e) { console.error(e); } - if (metaData.forcedUTF8 && request.type !== "script" || - editedText !== null && response.text !== editedText) { + if (editedText !== null && + (metaData.forcedUTF8 && request.type !== "script" || + response.text !== editedText)) { // if we changed the charset, the text or both, let's re-encode filter.write(new TextEncoder().encode(editedText)); } else { |