From 419d67c37c4073f5a1376dd52775a1893e71af76 Mon Sep 17 00:00:00 2001 From: zhaohuijun Date: Tue, 18 Aug 2020 17:17:54 +0800 Subject: [PATCH] use rawName when check selfClosing Tag --- src/html/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/parser.ts b/src/html/parser.ts index 7db37671..53d2f393 100644 --- a/src/html/parser.ts +++ b/src/html/parser.ts @@ -491,7 +491,7 @@ export class Parser { // Check whether the self-closing is valid. const isVoid = - namespace === NS.HTML && HTML_VOID_ELEMENT_TAGS.has(element.name) + namespace === NS.HTML && HTML_VOID_ELEMENT_TAGS.has(element.rawName) if (token.selfClosing && !isVoid && namespace === NS.HTML) { this.reportParseError( token,