|
|
@@ -583,7 +583,13 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (href) {
|
|
|
const normalizedHref = DomUtil.normalizeURL(href);
|
|
|
if (element.tagName == "LINK" || normalizedHref == href) {
|
|
|
- element.setAttribute("href", new URL(href, this.options.baseURI || this.options.url));
|
|
|
+ try {
|
|
|
+ element.setAttribute("href", new URL(href, this.options.baseURI || this.options.url));
|
|
|
+ } catch (error) {
|
|
|
+ if (element.tagName == "LINK") {
|
|
|
+ element.setAttribute("href", EMPTY_URL);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|