mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-01-22 15:31:03 +01:00
Set correct charset in HTML when HTML filter is active (#736)
This commit is contained in:
parent
7d29d9b53a
commit
b38ec6f46b
@ -117,6 +117,9 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
|
||||
}
|
||||
str += decoder.decode(); // end-of-stream
|
||||
|
||||
// set UTF-8 in document
|
||||
str = str.replace(new RegExp(`charset=["']?${charset}["']?`), 'charset="utf8"');
|
||||
|
||||
// remove crossorigin and integrity attributes
|
||||
str = str.replace(/<(link|script)[^>]+>/ig, (m) => {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
|
@ -35,6 +35,7 @@
|
||||
<p>Improved</p>
|
||||
<ul>
|
||||
<li>Unused permission removed (since Firefox 86) <a href="https://codeberg.org/nobody/LocalCDN/issues/734">#734</a></li>
|
||||
<li>Set correct charset in HTML when HTML filter is active <a href="https://codeberg.org/nobody/LocalCDN/issues/736">#736</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="generator-section">
|
||||
|
Loading…
Reference in New Issue
Block a user