From d0da95920f6cb58a1ff4f36c171e3320d30335bd Mon Sep 17 00:00:00 2001 From: Max Edell Date: Tue, 12 Aug 2025 16:39:06 -0700 Subject: [PATCH] fix: strip html from description --- src/product-merchant-feed-pipe.js | 3 ++- test/fixtures/index/merchant-feed.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/product-merchant-feed-pipe.js b/src/product-merchant-feed-pipe.js index 04790e3..f664eb9 100644 --- a/src/product-merchant-feed-pipe.js +++ b/src/product-merchant-feed-pipe.js @@ -17,6 +17,7 @@ import initConfig from './steps/init-config.js'; import fetchContent from './steps/fetch-content.js'; import { setLastModified } from './utils/last-modified.js'; import { compute404Keys } from './steps/set-cache-headers.js'; +import { stripHTML } from './steps/utils.js'; /** * @param {string} key @@ -91,7 +92,7 @@ const feedEntry = (state, req, entry) => ` ${entry.id} ${entry.title ?? ''} - ${entry.description ?? ''} + ${stripHTML(entry.description ?? '')} ${entry.link ?? ''} ${relToAbsLink(state, req, entry.image_link)} diff --git a/test/fixtures/index/merchant-feed.xml b/test/fixtures/index/merchant-feed.xml index 1fbd2b1..1d36964 100644 --- a/test/fixtures/index/merchant-feed.xml +++ b/test/fixtures/index/merchant-feed.xml @@ -464,7 +464,7 @@ undefined 5-Speed Immersion Blender 4-Piece Deluxe Bundle - 4-Piece Deluxe Immersion Blender Bundle + 4-Piece Deluxe Immersion Blender Bundle