Procházet zdrojové kódy

remove src attribute on source tags

Gildas před 7 roky
rodič
revize
9fc72ffe9d
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

@@ -312,7 +312,7 @@ this.SingleFileCore = (() => {
 			this.doc.querySelectorAll("applet, meta[http-equiv=refresh], object:not([type=\"image/svg+xml\"]):not([type=\"image/svg-xml\"]):not([type=\"text/html\"]), embed:not([src*=\".svg\"]), link[rel*=preload], link[rel*=prefetch]").forEach(element => element.remove());
 			this.doc.querySelectorAll("[onload]").forEach(element => element.removeAttribute("onload"));
 			this.doc.querySelectorAll("[onerror]").forEach(element => element.removeAttribute("onerror"));
-			this.doc.querySelectorAll("audio[src], video[src]").forEach(element => element.removeAttribute("src"));
+			this.doc.querySelectorAll("audio[src], audio > source[src], video[src], video > source[src]").forEach(element => element.removeAttribute("src"));
 		}
 
 		removeScripts() {