|
@@ -483,10 +483,11 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
resetCharsetMeta() {
|
|
resetCharsetMeta() {
|
|
|
|
|
+ let charSet;
|
|
|
this.doc.querySelectorAll("meta[charset], meta[http-equiv=\"content-type\"]").forEach(element => {
|
|
this.doc.querySelectorAll("meta[charset], meta[http-equiv=\"content-type\"]").forEach(element => {
|
|
|
const charSetDeclaration = element.content.split(";")[1];
|
|
const charSetDeclaration = element.content.split(";")[1];
|
|
|
- if (charSetDeclaration) {
|
|
|
|
|
- const charSet = charSetDeclaration.split("=")[1];
|
|
|
|
|
|
|
+ if (charSetDeclaration && !charSet) {
|
|
|
|
|
+ charSet = charSetDeclaration.split("=")[1];
|
|
|
if (charSet) {
|
|
if (charSet) {
|
|
|
this.charSet = charSet.trim().toLowerCase();
|
|
this.charSet = charSet.trim().toLowerCase();
|
|
|
}
|
|
}
|