// Generated, do not edit. sha256:d90f8fe12862c6daa6656fef5bf8ba13b2a3cb9d3b9cb9d68c08cde20d6f7420
import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { esc } from '../../client/ui/escape.js';
describe('esc', () => {
it('escapes the five characters that can make HTML structure', () => {
assert.equal(esc('&'), '&');
assert.equal(esc('<'), '<');
assert.equal(esc('>'), '>');
assert.equal(esc('"'), '"');
assert.equal(esc("'"), ''');
});
it('a script payload no longer becomes a tag', () => {
assert.equal(esc(''), '<img src=x onerror="alert(1)">');
});
it('does not break out of a quoted attribute value', () => {
const html = `