From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- node_modules/entities/src/escape.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 node_modules/entities/src/escape.spec.ts (limited to 'node_modules/entities/src/escape.spec.ts') diff --git a/node_modules/entities/src/escape.spec.ts b/node_modules/entities/src/escape.spec.ts new file mode 100644 index 0000000..582af1a --- /dev/null +++ b/node_modules/entities/src/escape.spec.ts @@ -0,0 +1,14 @@ +import { describe, it, expect } from "vitest"; +import * as entities from "./index.js"; + +describe("escape HTML", () => { + it("should escape HTML attribute values", () => + expect(entities.escapeAttribute(' & value \u00A0!')).toBe( + " & value  !", + )); + + it("should escape HTML text", () => + expect(entities.escapeText(' & value \u00A0!')).toBe( + '<a " text > & value  !', + )); +}); -- cgit v1.2.3