Skip to content

Commit f852354

Browse files
committed
fix: Ensure cellPadding, cellSpacing, and useMap` are lower-cased
1 parent e2c8fa1 commit f852354

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;
22
export const UNSAFE_NAME = /[\s\n\\/='"\0<>]/;
33
export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;
4-
export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/;
4+
export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^cell|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|useM|item[A-Z]/;
55
export const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;
66

77
// DOM properties that should NOT have "px" added when numeric

test/utils.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ export const htmlAttributes = {
297297
autoFocus: 'autofocus',
298298
autoPlay: 'autoplay',
299299
capture: 'capture',
300-
cellPadding: 'cellPadding',
301-
cellSpacing: 'cellSpacing',
300+
cellPadding: 'cellpadding',
301+
cellSpacing: 'cellspacing',
302302
charSet: 'charset',
303303
challenge: 'challenge',
304304
checked: 'checked',
@@ -412,7 +412,7 @@ export const htmlAttributes = {
412412
target: 'target',
413413
title: 'title',
414414
type: 'type',
415-
useMap: 'useMap',
415+
useMap: 'usemap',
416416
value: 'value',
417417
volume: 'volume',
418418
width: 'width',

0 commit comments

Comments
 (0)