@wise/dynamic-flow-client 5.25.2-experimental-a8a898e → 5.25.3

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/build/main.js CHANGED
@@ -1336,8 +1336,13 @@ var makeDismissHandler = (onDismiss, mapperProps) => () => {
1336
1336
 
1337
1337
  // src/utils/safe-parse-link.ts
1338
1338
  var safeParseLink = (url) => {
1339
- const parsed = URL.parse(url);
1340
- if ((parsed == null ? void 0 : parsed.protocol) === "javascript:") {
1339
+ let parsed;
1340
+ try {
1341
+ parsed = new URL(url);
1342
+ } catch (e) {
1343
+ return url;
1344
+ }
1345
+ if (parsed.protocol === "javascript:") {
1341
1346
  throw new Error("Javascript URLs are not allowed");
1342
1347
  }
1343
1348
  return url;
package/build/main.mjs CHANGED
@@ -1305,8 +1305,13 @@ var makeDismissHandler = (onDismiss, mapperProps) => () => {
1305
1305
 
1306
1306
  // src/utils/safe-parse-link.ts
1307
1307
  var safeParseLink = (url) => {
1308
- const parsed = URL.parse(url);
1309
- if ((parsed == null ? void 0 : parsed.protocol) === "javascript:") {
1308
+ let parsed;
1309
+ try {
1310
+ parsed = new URL(url);
1311
+ } catch (e) {
1312
+ return url;
1313
+ }
1314
+ if (parsed.protocol === "javascript:") {
1310
1315
  throw new Error("Javascript URLs are not allowed");
1311
1316
  }
1312
1317
  return url;