@@ -392,8 +392,8 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
392392 break ;
393393
394394 default : {
395- if ( isSvgMode && XLINK . test ( name ) ) {
396- name = name . toLowerCase ( ) . replace ( XLINK_REPLACE_REGEX , 'xlink:' ) ;
395+ if ( NAMESPACE_REPLACE_REGEX . test ( name ) ) {
396+ name = name . replace ( NAMESPACE_REPLACE_REGEX , '$1:$2' ) . toLowerCase ( ) ;
397397 } else if ( UNSAFE_NAME . test ( name ) ) {
398398 continue ;
399399 } else if ( ( name [ 4 ] === '-' || name === 'draggable' ) && v != null ) {
@@ -407,8 +407,6 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
407407 name === 'panose1'
408408 ? 'panose-1'
409409 : name . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( ) ;
410- } else if ( XML_REPLACE_REGEX . test ( name ) ) {
411- name = name . toLowerCase ( ) . replace ( XML_REPLACE_REGEX , 'xml:' ) ;
412410 }
413411 } else if ( HTML_LOWER_CASE . test ( name ) ) {
414412 name = name . toLowerCase ( ) ;
@@ -458,8 +456,7 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
458456
459457const HTML_LOWER_CASE = / ^ a c c e s s K | ^ a u t o [ A - Z ] | ^ c h | ^ c o l | c o n t | c r o s s | d a t e T | e n c T | f o r m [ A - Z ] | f r a m e | h r e f L | i n p u t M | m a x L | m i n L | n o V | p l a y s I | r e a d O | r o w S | s p e l l C | s r c [ A - Z ] | t a b I | i t e m [ A - Z ] / ;
460458const SVG_CAMEL_CASE = / ^ a c | ^ a l i | a r a b i c | b a s e l | c a p | c l i p P a t h $ | c l i p R u l e $ | c o l o r | d o m i n a n t | e n a b l e | f i l l | f l o o d | f o n t | g l y p h [ ^ R ] | h o r i z | i m a g e | l e t t e r | l i g h t i n g | m a r k e r [ ^ W U H ] | o v e r l i n e | p a n o s e | p o i n t e | p a i n t | r e n d e r i n g | s h a p e | s t o p | s t r i k e t h r o u g h | s t r o k e | t e x t [ ^ L ] | t r a n s f o r m | u n d e r l i n e | u n i c o d e | u n i t s | ^ v [ ^ i ] | ^ w | ^ x H / ;
461- const XML_REPLACE_REGEX = / ^ x m l : ? / ;
462- const XLINK_REPLACE_REGEX = / ^ x l i n k : ? / ;
459+ const NAMESPACE_REPLACE_REGEX = / ^ ( x l i n k | x m l n s | x m l ) ( : | [ A - Z ] ) / ;
463460const SELF_CLOSING = new Set ( [
464461 'area' ,
465462 'base' ,
0 commit comments