import { describe, expect, test } from "vitest"; import { sanitizeInlineHtml } from "./inline"; // Payload from GHSA-h73g-85mv-f42f: a full-screen overlay with a phishing link. const OVERLAY_PAYLOAD = `
This recipe has been removed. Click here.
d")).toEqual( "a b c
d", ); }); test("strips block elements, links, images, and styles from the overlay payload", () => { const html = sanitizeInlineHtml(OVERLAY_PAYLOAD); for (const fragment of ["