mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-02 12:27:27 +01:00
Regex modified for charset in HTML source code
This commit is contained in:
parent
2840cd6d1b
commit
65ae6f6e79
@ -71,7 +71,7 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
|
||||
let htmlHead = asciiDecoder.decode(evt.data, {stream: false});
|
||||
let charsetMatch = htmlHead.match(/<meta\s+charset=["']?([^>"'\/]+)["'>\/]/i);
|
||||
if (!charsetMatch) {
|
||||
charsetMatch = htmlHead.match(/<meta\s+http-equiv=["']?content-type["']?\s+content=["']?text\/html;\s+charset=([^>"'\/]+)["'>\/]/i);
|
||||
charsetMatch = htmlHead.match(/<meta\s+http-equiv=["']?content-type["']?\s+content=["']?text\/html;\s*charset=([^>"'\/]+)["'>\/]/i);
|
||||
}
|
||||
charset = charsetMatch ? charsetMatch[1] : "UTF-8";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user