changeset 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 da5299097a48
children e25dce8b49c3
files js/background.js
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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};