1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Fixed: Default charset of HTML filter (#567)

This commit is contained in:
nobody
2021-07-13 06:26:45 +02:00
parent 9c1faf8a6a
commit f8357e30c2
2 changed files with 5 additions and 1 deletions

View File

@@ -97,7 +97,10 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
if (EncodingTypes[charsetMatch[1].toLowerCase()] !== undefined) {
charset = charsetMatch[1];
} else {
charset = 'UTF-8';
// If charset is unclear, then use ASCII by default.
// Other charsets are mostly tagged in the header or HTML source code.
// https://codeberg.org/nobody/LocalCDN/issues/567
charset = 'ASCII';
}
}
decoder = new TextDecoder(charset);