@metascraper/helpers 5.49.15 → 5.49.16

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +1 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metascraper/helpers",
3
3
  "description": "Collection of helper functions used by metascraper",
4
4
  "homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-helpers",
5
- "version": "5.49.15",
5
+ "version": "5.49.16",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "2f0e1b59f853c02be3cafce581925536f62af712"
67
+ "gitHead": "526d4405231157b84d5934c7cda0f99c662a976f"
68
68
  }
package/src/index.js CHANGED
@@ -285,6 +285,7 @@ const url = (value, { url = '' } = {}) => {
285
285
 
286
286
  let sanitizedValue = value
287
287
  if (value.startsWith('data:')) {
288
+ if (!dataUri.test(value)) return undefined
288
289
  const [header, data] = value.split(',')
289
290
  const cleanData = data.replace(/\s+/g, '')
290
291
  sanitizedValue = `${header},${cleanData}`