@adobe/helix-html-pipeline 6.27.6 → 6.27.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [6.27.7](https://github.com/adobe/helix-html-pipeline/compare/v6.27.6...v6.27.7) (2025-10-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * catch invalid image urls in metadata ([#965](https://github.com/adobe/helix-html-pipeline/issues/965)) ([2b8f9b6](https://github.com/adobe/helix-html-pipeline/commit/2b8f9b64eeae8f7a446e3c0ea2b4d5a97d85ab0c))
7
+
1
8
  ## [6.27.6](https://github.com/adobe/helix-html-pipeline/compare/v6.27.5...v6.27.6) (2025-10-20)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.27.6",
3
+ "version": "6.27.7",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  "jsdom": "27.0.0",
88
88
  "junit-report-builder": "5.1.1",
89
89
  "lint-staged": "16.2.3",
90
- "mocha": "11.7.2",
90
+ "mocha": "11.7.4",
91
91
  "mocha-multi-reporters": "1.5.1",
92
92
  "mocha-suppress-logs": "0.6.0",
93
93
  "semantic-release": "25.0.0"
@@ -274,9 +274,13 @@ export default function extractMetaData(state, req) {
274
274
  meta.image = content.image || '/default-meta-image.png';
275
275
  }
276
276
  if (meta.image) {
277
- meta.image = rewriteUrl(state, meta.image);
278
- meta.image = optimizeMetaImage(state.info.path, meta.image);
279
- meta.image = getAbsoluteUrl(state, meta.image);
277
+ try {
278
+ meta.image = rewriteUrl(state, meta.image);
279
+ meta.image = optimizeMetaImage(state.info.path, meta.image);
280
+ meta.image = getAbsoluteUrl(state, meta.image);
281
+ } catch (e) {
282
+ // ignore url errors
283
+ }
280
284
  }
281
285
 
282
286
  meta.imageAlt = meta['image-alt'] ?? content.imageAlt;
@@ -161,7 +161,11 @@ export function resolveUrl(from, to) {
161
161
  const resolvedUrl = new URL(to, new URL(from, DUMMY_BASE));
162
162
  if (resolvedUrl.origin === DUMMY_BASE) {
163
163
  // `from` is a relative URL.
164
- const { pathname, search, hash } = resolvedUrl;
164
+ const {
165
+ pathname,
166
+ search,
167
+ hash,
168
+ } = resolvedUrl;
165
169
  return pathname + search + hash;
166
170
  }
167
171
  return resolvedUrl.toString();