Skip to content

Commit e26752b

Browse files
committed
[AG] fix #219 : Add missing _ in attr name regex
1 parent a8ccdb9 commit e26752b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exports.validate = function (xmlData, options) {
3232
// check for byte order mark (BOM)
3333
xmlData = xmlData.substr(1);
3434
}
35-
const regxAttrName = new RegExp(`^[${options.localeRange}_][${options.localeRange}0-9\\-\\.:]*$`);
35+
const regxAttrName = new RegExp(`^[${options.localeRange}_][${options.localeRange}0-9_\\-\\.:]*$`);
3636
const regxTagName = new RegExp(`^([${options.localeRange}_])[${options.localeRange}0-9\\.\\-_:]*$`);
3737
for (let i = 0; i < xmlData.length; i++) {
3838
if (xmlData[i] === '<') {

0 commit comments

Comments
 (0)