|
|
@@ -380,7 +380,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (this.options.removeScripts) {
|
|
|
this.onEventAttributeNames.forEach(attributeName => this.doc.querySelectorAll("[" + attributeName + "]").forEach(element => element.removeAttribute(attributeName)));
|
|
|
this.doc.querySelectorAll("[href]").forEach(element => {
|
|
|
- if (element.href && element.href.match(/^\s*javascript:/)) {
|
|
|
+ if (element.href && element.href.match && element.href.match(/^\s*javascript:/)) {
|
|
|
element.removeAttribute("href");
|
|
|
}
|
|
|
});
|