From c3111a04d804aad719228420209f0af1e4c35432 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 25 Feb 2026 02:33:41 +0100 Subject: [PATCH] fix: filter out MDX parsing artifacts from product descriptions --- app/[locale]/products/[...slug]/page.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/[locale]/products/[...slug]/page.tsx b/app/[locale]/products/[...slug]/page.tsx index 90c4812b..f39f736d 100644 --- a/app/[locale]/products/[...slug]/page.tsx +++ b/app/[locale]/products/[...slug]/page.tsx @@ -273,7 +273,14 @@ export default async function ProductPage({ params }: ProductPageProps) { (node: any) => node.type === 'block' && node.fields?.blockType === 'productTabs', ); if (tabsBlock?.fields?.content?.root?.children) { - descriptionChildren = tabsBlock.fields.content.root.children; + descriptionChildren = tabsBlock.fields.content.root.children.filter((node: any) => { + // Filter out MDX parsing artifacts like `}>` + if (node.type === 'paragraph' && node.children?.length === 1) { + const text = node.children[0]?.text?.trim(); + return text !== '}>' && text !== '{' && text !== '}'; + } + return true; + }); } }