@shotstack/shotstack-canvas 1.8.2 → 1.8.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.
@@ -3490,7 +3490,7 @@ var LINE_TAG_REGEX = /<line([^/>]*)\/?>/gi;
3490
3490
  var POLYLINE_TAG_REGEX = /<polyline([^/>]*)\/?>/gi;
3491
3491
  var POLYGON_TAG_REGEX = /<polygon([^/>]*)\/?>/gi;
3492
3492
  function extractAttribute(attrs, name) {
3493
- const regex = new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`, "i");
3493
+ const regex = new RegExp(`(?:^|\\s)${name}\\s*=\\s*["']([^"']*)["']`, "i");
3494
3494
  const match = attrs.match(regex);
3495
3495
  return match ? match[1] : void 0;
3496
3496
  }
@@ -3425,7 +3425,7 @@ var LINE_TAG_REGEX = /<line([^/>]*)\/?>/gi;
3425
3425
  var POLYLINE_TAG_REGEX = /<polyline([^/>]*)\/?>/gi;
3426
3426
  var POLYGON_TAG_REGEX = /<polygon([^/>]*)\/?>/gi;
3427
3427
  function extractAttribute(attrs, name) {
3428
- const regex = new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`, "i");
3428
+ const regex = new RegExp(`(?:^|\\s)${name}\\s*=\\s*["']([^"']*)["']`, "i");
3429
3429
  const match = attrs.match(regex);
3430
3430
  return match ? match[1] : void 0;
3431
3431
  }
package/dist/entry.web.js CHANGED
@@ -3084,7 +3084,7 @@ var LINE_TAG_REGEX = /<line([^/>]*)\/?>/gi;
3084
3084
  var POLYLINE_TAG_REGEX = /<polyline([^/>]*)\/?>/gi;
3085
3085
  var POLYGON_TAG_REGEX = /<polygon([^/>]*)\/?>/gi;
3086
3086
  function extractAttribute(attrs, name) {
3087
- const regex = new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`, "i");
3087
+ const regex = new RegExp(`(?:^|\\s)${name}\\s*=\\s*["']([^"']*)["']`, "i");
3088
3088
  const match = attrs.match(regex);
3089
3089
  return match ? match[1] : void 0;
3090
3090
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/shotstack-canvas",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Text layout & animation engine (HarfBuzz) for Node & Web - fully self-contained.",
5
5
  "type": "module",
6
6
  "main": "./dist/entry.node.cjs",