Initialize TextDecoder with charset if undefined (#1636)

This commit is contained in:
nobody 2024-08-05 06:30:09 +02:00
parent 0f909daa2b
commit f754810731
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 8 additions and 0 deletions

View File

@ -116,6 +116,10 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
data.push(chunk);
};
if (decoder === undefined) {
decoder = new TextDecoder(charset);
}
filter.onstop = () => {
let str = '';
for (let buffer of data) {

View File

@ -34,6 +34,10 @@
<ul>
<li>Remove UTF-8-BOM in HTML document (<a href="https://codeberg.org/nobody/LocalCDN/issues/1635">#1635</a>)</li>
</ul>
<p>Fixed</p>
<ul>
<li>Initialize TextDecoder with charset if undefined (<a href="https://codeberg.org/nobody/LocalCDN/issues/1636">#1636</a>)</li>
</ul>
</div>
<div id="generator-section">
<div class="topic-label">