|
|
@@ -18,7 +18,7 @@
|
|
|
* along with SingleFile. If not, see <http://www.gnu.org/licenses/>.
|
|
|
*/
|
|
|
|
|
|
-/* global CSSRule */
|
|
|
+/* global CSSRule, HTMLElement */
|
|
|
|
|
|
this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
|
|
|
@@ -431,7 +431,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
|
|
|
preProcessPage() {
|
|
|
this.doc.querySelectorAll("singlefile-infobar, singlefile-mask").forEach(element => element.remove());
|
|
|
- this.doc.body.querySelectorAll("title, meta").forEach(element => this.doc.head.appendChild(element));
|
|
|
+ this.doc.body.querySelectorAll(":not(svg) title, meta").forEach(element => element instanceof HTMLElement && this.doc.head.appendChild(element));
|
|
|
if (this.options.imageData) {
|
|
|
const dataAttributeName = DOM.imagesAttributeName(this.options.sessionId);
|
|
|
this.doc.querySelectorAll("img").forEach(imgElement => {
|