diff --git a/test/security.js b/test/security.js index 0c8ee59..d435956 100644 --- a/test/security.js +++ b/test/security.js @@ -32,6 +32,18 @@ test('security', async function (t) { } ) + await t.test( + 'should make sure href attributes render (unsafe)', + async function () { + assert.equal( + toHtml(h('a', {href: 'https://a?b&c'}), { + allowParseErrors: true, + }), + '', + ) + } + ) + await t.test('should make sure texts are encoded (safe)', async function () { assert.equal( toHtml(u('root', u('text', ''))),