Merge pull request #2540 from codetaylor/master

BUGFIX: exception validating 'data-' attributes
This commit is contained in:
Régis Hanol 2014-07-15 10:41:45 +02:00
commit 09924da60b

View File

@ -28,7 +28,7 @@ function validateAttribute(tagName, attribName, value) {
// data-* attributes
if (tag) {
var allowed = tag[attribName] || tag['data-*'];
if (allowed === value || allowed.indexOf('*') !== -1) { return value; }
if (allowed && (allowed === value || allowed.indexOf('*') !== -1)) { return value; }
}
}