From 81608420496a4b8a72781dd21fd88c85173e7447 Mon Sep 17 00:00:00 2001 From: Val Alexander Date: Fri, 5 Jun 2026 16:42:24 -0700 Subject: [PATCH 1/2] fix: harden help center MCP and JSON-LD --- apps/web/src/components/json-ld.tsx | 4 +++- apps/web/src/lib/server/mcp/tools.ts | 20 ++++++++++++++++--- .../__tests__/json-ld-serialization.test.ts | 16 +++++++++++++++ .../src/lib/shared/json-ld-serialization.ts | 14 +++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 apps/web/src/lib/shared/__tests__/json-ld-serialization.test.ts create mode 100644 apps/web/src/lib/shared/json-ld-serialization.ts diff --git a/apps/web/src/components/json-ld.tsx b/apps/web/src/components/json-ld.tsx index a74cbea86..9db28b5ac 100644 --- a/apps/web/src/components/json-ld.tsx +++ b/apps/web/src/components/json-ld.tsx @@ -1,9 +1,11 @@ +import { serializeJsonLd } from '@/lib/shared/json-ld-serialization' + /** * JsonLd - Renders a &' + + const result = serializeJsonLd({ headline: payload }) + + expect(result).not.toContain('') + expect(result).not.toContain('