mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 11:01:37 +00:00
10 lines
377 B
TypeScript
10 lines
377 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { escapeHtml } from "./text-utility-runtime.js";
|
|
|
|
describe("escapeHtml", () => {
|
|
it("escapes five HTML-sensitive characters and existing entity markers", () => {
|
|
expect(escapeHtml(`&<>"'`)).toBe("&<>"'");
|
|
expect(escapeHtml("already & escaped")).toBe("already &amp; escaped");
|
|
});
|
|
});
|