diff js/background.js @ 37:6bd8a649186d

Fix charset encoding in rewritten Content-Type header The charset encoding in the rewritten Content-Type header must be UTF-8 since that is what the original response body will be converted to. This fixes the garbled text seen when viewing feeds using charset encodings other than UTF-8.
author Guido Berhoerster <guido+feed-preview@berhoerster.name>
date Mon, 01 Apr 2019 21:04:05 +0200
parents 688d75e554e0
children 586eebf8efb7
line wrap: on
line diff
--- a/js/background.js	Mon Apr 01 20:39:08 2019 +0200
+++ b/js/background.js	Mon Apr 01 21:04:05 2019 +0200
@@ -171,7 +171,7 @@
 
     details.responseHeaders[contentTypeIndex] = {
         name: 'Content-Type',
-        value: `application/xml;charset=${contentType.charset}`
+        value: 'application/xml;charset=utf-8'
     };
 
     return {responseHeaders: details.responseHeaders};