Przeglądaj źródła

remove src attribute on source tags

Gildas 7 lat temu
rodzic
commit
9fc72ffe9d
1 zmienionych plików z 1 dodań i 1 usunięć
  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() {