|
|
@@ -187,7 +187,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (this.options.insertSingleFileComment) {
|
|
|
this.processor.insertSingleFileCommentNode();
|
|
|
}
|
|
|
- this.processor.removeBase();
|
|
|
+ this.processor.removeDefaultHeadTags();
|
|
|
}
|
|
|
|
|
|
getPageData() {
|
|
|
@@ -466,8 +466,11 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- removeBase() {
|
|
|
+ removeDefaultHeadTags() {
|
|
|
this.doc.querySelectorAll("base").forEach(element => element.remove());
|
|
|
+ if (this.doc.head.querySelectorAll("*").length == 1 && this.doc.head.querySelector("meta[charset]") && this.doc.body.childNodes.length == 0) {
|
|
|
+ this.doc.head.querySelector("meta[charset]").remove();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
removeInfoToolbar() {
|