single-file-core 1.5.31 → 1.5.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/index.js +10 -2
- package/package.json +1 -1
package/core/index.js
CHANGED
|
@@ -909,7 +909,11 @@ class Processor {
|
|
|
909
909
|
}
|
|
910
910
|
originalElement.childNodes.forEach(childNode => placeHolderElement.appendChild(childNode.cloneNode(true)));
|
|
911
911
|
}
|
|
912
|
-
|
|
912
|
+
try {
|
|
913
|
+
templateElement.replaceWith(placeHolderElement);
|
|
914
|
+
} catch (error) {
|
|
915
|
+
// ignored
|
|
916
|
+
}
|
|
913
917
|
}
|
|
914
918
|
});
|
|
915
919
|
}
|
|
@@ -1252,7 +1256,11 @@ class Processor {
|
|
|
1252
1256
|
}
|
|
1253
1257
|
Array.from(frameElement.childNodes).forEach(node => node.remove());
|
|
1254
1258
|
if (src && !testIgnoredPath(src)) {
|
|
1255
|
-
|
|
1259
|
+
try {
|
|
1260
|
+
url = util.resolveURL(src, this.baseURI);
|
|
1261
|
+
} catch (error) {
|
|
1262
|
+
// ignored
|
|
1263
|
+
}
|
|
1256
1264
|
if (this.options.saveOriginalURLs && src && !isDataURL(src)) {
|
|
1257
1265
|
frameElement.setAttribute("data-sf-original-src", url);
|
|
1258
1266
|
}
|