Procházet zdrojové kódy

remove stylesheet link tags w/o href

Former-commit-id: 573bb9be885af6bbd8b11e09a8055f2136f18968
Gildas před 6 roky
rodič
revize
4eb0bc394a
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -675,7 +675,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					element.remove();
 				}
 			});
-			this.doc.querySelectorAll("link[rel*=stylesheet][rel*=alternate][title]").forEach(element => element.remove());
+			this.doc.querySelectorAll("link[rel*=stylesheet][rel*=alternate][title],link[rel*=stylesheet]:not([href])").forEach(element => element.remove());
 			if (this.options.compressHTML) {
 				this.doc.querySelectorAll("input[type=hidden]").forEach(element => element.remove());
 			}