diff --git a/packages/happy-dom/src/config/HTMLElementUnnestable.ts b/packages/happy-dom/src/config/HTMLElementUnnestable.ts
index 1d2820a10..829a641a6 100644
--- a/packages/happy-dom/src/config/HTMLElementUnnestable.ts
+++ b/packages/happy-dom/src/config/HTMLElementUnnestable.ts
@@ -10,7 +10,6 @@ export default {
H4: true,
H5: true,
H6: true,
- LI: true,
OPTION: true,
P: true,
SELECT: true,
diff --git a/packages/happy-dom/test/xml-parser/XMLParser.test.ts b/packages/happy-dom/test/xml-parser/XMLParser.test.ts
index 7c4d17152..d68373fb6 100644
--- a/packages/happy-dom/test/xml-parser/XMLParser.test.ts
+++ b/packages/happy-dom/test/xml-parser/XMLParser.test.ts
@@ -205,30 +205,50 @@ describe('XMLParser', () => {
expect(new XMLSerializer().serializeToString(root)).toBe(GET_EXPECTED_HTML(pageHTML));
});
- it('Handles unclosed tags of unnestable elements (e.g. , ).', () => {
+ it('Removes nesting from unnestable elements (e.g. ,