@@ -384,6 +384,12 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
384384					v  =  styleObjToCss ( v ) ; 
385385				} 
386386				break ; 
387+ 			case  'acceptCharset' :
388+ 				name  =  'accept-charset' ; 
389+ 				break ; 
390+ 			case  'httpEquiv' :
391+ 				name  =  'http-equiv' ; 
392+ 				break ; 
387393
388394			default : { 
389395				if  ( isSvgMode  &&  XLINK . test ( name ) )  { 
@@ -395,6 +401,14 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
395401					// `draggable` is an enumerated attribute and not Boolean. A value of `true` or `false` is mandatory 
396402					// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable 
397403					v  +=  '' ; 
404+ 				}  else  if  ( isSvgMode )  { 
405+ 					if  ( SVG_CAMEL_CASE . test ( name ) )  { 
406+ 						name  =  name  ===  'panose1'  ? 'panose-1'  : camelToKebab ( name ) ; 
407+ 					}  else  if  ( XML_REPLACE_REGEX . test ( name ) )  { 
408+ 						name  =  name . toLowerCase ( ) . replace ( XML_REPLACE_REGEX ,  'xml:' ) ; 
409+ 					} 
410+ 				}  else  if  ( ! HTML_SKIP_CASE . test ( name ) )  { 
411+ 					name  =  name . toLowerCase ( ) ; 
398412				} 
399413			} 
400414		} 
@@ -439,6 +453,16 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
439453	return  s  +  '>'  +  html  +  '</'  +  type  +  '>' ; 
440454} 
441455
456+ /** 
457+  * Convert fooBar strings to foo-bar 
458+  * @param  {string } str 
459+  */ 
460+ const  camelToKebab  =  ( str )  => 
461+ 	str . replace ( / [ A - Z ] / g,  ( c )  =>  '-'  +  c . toLowerCase ( ) ) ; 
462+ 463+ const  HTML_SKIP_CASE  =  / ^ c e l l | ^ d e f a u l t | u s e / ; 
464+ const  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 / ; 
465+ const  XML_REPLACE_REGEX  =  / ^ x m l : ? / ; 
442466const  XLINK_REPLACE_REGEX  =  / ^ x l i n k : ? / ; 
443467const  SELF_CLOSING  =  new  Set ( [ 
444468	'area' , 
0 commit comments