From: daiwei Date: Tue, 29 Jul 2025 01:45:45 +0000 (+0800) Subject: fix: improve namespace handling for SVG and MathML tags X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb4207c99996e481e09a6dbd754ff84f82bc08f8;p=thirdparty%2Fvuejs%2Fcore.git fix: improve namespace handling for SVG and MathML tags --- diff --git a/packages/compiler-dom/src/parserOptions.ts b/packages/compiler-dom/src/parserOptions.ts index 7da13bf534..5ee2f99fb3 100644 --- a/packages/compiler-dom/src/parserOptions.ts +++ b/packages/compiler-dom/src/parserOptions.ts @@ -24,7 +24,7 @@ export const parserOptions: ParserOptions = { let ns = parent ? parent.ns : rootNamespace if (parent && ns === Namespaces.MATH_ML) { if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { + if (isSVGTag(tag)) { return Namespaces.SVG } if ( @@ -57,10 +57,10 @@ export const parserOptions: ParserOptions = { } if (ns === Namespaces.HTML) { - if (tag === 'svg') { + if (isSVGTag(tag)) { return Namespaces.SVG } - if (tag === 'math') { + if (isMathMLTag(tag)) { return Namespaces.MATH_ML } }