Spaces:
Running
Running
Download src/components/GraphView.test.ts from Treck001/textmosaic: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/Treck001/textmosaic/resolve/main/src/components/GraphView.test.ts
- Command line
-
hf download hf://spaces/Treck001/textmosaic/src/components/GraphView.test.ts
-
curl -L -o GraphView.test.ts https://huggingface.co/spaces/Treck001/textmosaic/resolve/main/src/components/GraphView.test.ts
383 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { escapeHtml } from "./graphHtml"; | |
| describe("escapeHtml", () => { | |
| it("escapes entity and relation labels before the graph library renders HTML", () => { | |
| expect(escapeHtml("<img src=x onerror=\"alert(1)\"> & 'quoted'")).toBe( | |
| "<img src=x onerror="alert(1)"> & 'quoted'", | |
| ); | |
| }); | |
| }); | |