|
|
@@ -606,20 +606,10 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
const href = element.getAttribute("href");
|
|
|
if (!Util.testIgnoredPath(href) && Util.testValidPath(href, this.baseURI, this.options.url)) {
|
|
|
const normalizedHref = Util.normalizeURL(href);
|
|
|
- if (element.tagName == "LINK") {
|
|
|
- try {
|
|
|
- element.setAttribute("href", DocUtil.resolveURL(href, this.options.baseURI || this.options.url));
|
|
|
- } catch (error) {
|
|
|
- if (element.tagName == "LINK") {
|
|
|
- element.setAttribute("href", EMPTY_URL);
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (normalizedHref == href) {
|
|
|
- try {
|
|
|
- element.setAttribute("href", DocUtil.resolveURL(normalizedHref, this.options.baseURI || this.options.url));
|
|
|
- } catch (error) {
|
|
|
- // ignored
|
|
|
- }
|
|
|
+ try {
|
|
|
+ element.setAttribute("href", DocUtil.resolveURL(normalizedHref == href ? normalizedHref : href, this.options.baseURI || this.options.url));
|
|
|
+ } catch (error) {
|
|
|
+ element.setAttribute("href", EMPTY_URL);
|
|
|
}
|
|
|
}
|
|
|
});
|