File tree 3 files changed +49
-3
lines changed
3 files changed +49
-3
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ function _renderToString(
637
637
? 'panose-1'
638
638
: name . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( ) ;
639
639
}
640
- } else if ( HTML_LOWER_CASE . test ( name ) ) {
640
+ } else if ( HTML_LOWER_CASE . has ( name ) ) {
641
641
name = name . toLowerCase ( ) ;
642
642
}
643
643
}
Original file line number Diff line number Diff line change @@ -18,7 +18,53 @@ export const VOID_ELEMENTS = new Set([
18
18
] ) ;
19
19
export const UNSAFE_NAME = / [ \s \n \\ / = ' " \0 < > ] / ;
20
20
export const NAMESPACE_REPLACE_REGEX = / ^ ( x l i n k | x m l n s | x m l ) ( [ A - Z ] ) / ;
21
- export const HTML_LOWER_CASE = / ^ a c c e s s K | ^ a u t o [ A - Z ] | ^ c e l l | ^ 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 | p o p o v e r T | r e a d O | r o w S | s r c [ A - Z ] | t a b I | u s e M | i t e m [ A - Z ] / ;
21
+
22
+ export const HTML_LOWER_CASE = new Set ( [
23
+ 'accessKey' ,
24
+ 'accessKeyLabel' ,
25
+ 'autoComplete' ,
26
+ 'autoCorrect' ,
27
+ 'autoFocus' ,
28
+ 'autoPlay' ,
29
+ 'autoCapitalize' ,
30
+ 'cellPadding' ,
31
+ 'cellSpacing' ,
32
+ 'charSet' ,
33
+ 'colSpan' ,
34
+ 'contentEditable' ,
35
+ 'contextMenu' ,
36
+ 'controlsList' ,
37
+ 'crossOrigin' ,
38
+ 'dateTime' ,
39
+ 'encType' ,
40
+ 'formAction' ,
41
+ 'formEncType' ,
42
+ 'formMethod' ,
43
+ 'formNoValidate' ,
44
+ 'formTarget' ,
45
+ 'frameBorder' ,
46
+ 'hrefLang' ,
47
+ 'inputMode' ,
48
+ 'maxLength' ,
49
+ 'minLength' ,
50
+ 'noValidate' ,
51
+ 'playsInline' ,
52
+ 'popoverTarget' ,
53
+ 'popoverTargetAction' ,
54
+ 'readOnly' ,
55
+ 'rowSpan' ,
56
+ 'srcSet' ,
57
+ 'srcDoc' ,
58
+ 'srcLang' ,
59
+ 'tabIndex' ,
60
+ 'useMap' ,
61
+ 'itemProp' ,
62
+ 'itemScope' ,
63
+ 'itemType' ,
64
+ 'itemID' ,
65
+ 'itemRef'
66
+ ] ) ;
67
+
22
68
export 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 / ;
23
69
24
70
// Boolean DOM properties that translate to enumerated ('true'/'false') attributes
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ function _renderToStringPretty(
258
258
? 'panose-1'
259
259
: name . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( ) ;
260
260
}
261
- } else if ( HTML_LOWER_CASE . test ( name ) ) {
261
+ } else if ( HTML_LOWER_CASE . has ( name ) ) {
262
262
name = name . toLowerCase ( ) ;
263
263
}
264
264
You can’t perform that action at this time.
0 commit comments