From b0e39f503d808213515c802cda41a78d764e6d55 Mon Sep 17 00:00:00 2001 From: Damian Escobedo Date: Mon, 10 Dec 2018 18:31:24 -0700 Subject: [PATCH] fix for localeRange option in validator --- src/validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validator.js b/src/validator.js index f98b4923..e50914cf 100644 --- a/src/validator.js +++ b/src/validator.js @@ -22,7 +22,7 @@ exports.validate = function(xmlData, options) { if (xmlData[0] === "\ufeff") { // check for byte order mark (BOM) xmlData = xmlData.substr(1); } - const regxAttrName = new RegExp("^[_w][\\w\\-.:]*$".replace("_w", "_" + options.localeRange)); + const regxAttrName = new RegExp("^[_w][\\w\\-.:]*$".replace("w", options.localeRange)); const regxTagName = new RegExp("^([w]|_)[\\w.\\-_:]*".replace("([w", "([" + options.localeRange)); for (let i = 0; i < xmlData.length; i++) {