diff --git a/packages/happy-dom/test/html-parser/HTMLParser.test.ts b/packages/happy-dom/test/html-parser/HTMLParser.test.ts index 9eeddc0f9..7f64a36d5 100644 --- a/packages/happy-dom/test/html-parser/HTMLParser.test.ts +++ b/packages/happy-dom/test/html-parser/HTMLParser.test.ts @@ -2256,6 +2256,21 @@ describe('HTMLParser', () => { `); }); + it('Handles numeric character references and ' in attribute values for #1947', () => { + const result = new HTMLParser(window).parse(` +
+ + + +
`); + expect(new HTMLSerializer().serializeToString(result)).toBe(` +
+ + + +
`); + }); + it('Handles numeric character references in attribute values for #1947', () => { // Decimal numeric character reference const result1 = new HTMLParser(window).parse(`
`);