Skip to content

Commit 2007017

Browse files
committed
v-bind: improve global allowed attributes check
1 parent 82eed21 commit 2007017

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/directives/public/bind.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ var modelProps = {
2020
'false-value': '_falseValue'
2121
}
2222

23-
// regex to test for globally allowed attributes:
24-
// - class
25-
// - data-*
26-
// - aria-*
27-
// - role
28-
var globalAllowedAttrRE = /^class$|^role$|^data-|^aria-/
23+
// regex to test for globally allowed attributes.
24+
// we only need to include ones that:
25+
// - do not have a corresponding property, e.g. role, dropzone;
26+
// - cannot be camelized into the corresponding property, .e.g class, accesskey, contenteditable;
27+
var globalAllowedAttrRE = /^(class|role|accesskey|contenteditable|contextmenu|dropzone|hidden|tabindex)$|^data-|^aria-/
2928

3029
module.exports = {
3130

0 commit comments

Comments
 (0)