瀏覽代碼

remove hidden input elements

Gildas 7 年之前
父節點
當前提交
9718a90d34
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -364,7 +364,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 					element.remove();
 				}
 			});
-			this.doc.querySelectorAll("meta[http-equiv=\"content-security-policy\"").forEach(element => element.remove());
+			this.doc.querySelectorAll("meta[http-equiv=\"content-security-policy\"], input[type=hidden]").forEach(element => element.remove());
 			this.doc.querySelectorAll("a[ping]").forEach(element => element.removeAttribute("ping"));
 			if (this.options.removeScripts) {
 				this.onEventAttributeNames.forEach(attributeName => this.doc.querySelectorAll("[" + attributeName + "]").forEach(element => element.removeAttribute(attributeName)));