Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/validator_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("XMLParser", function() {

it("should return false for non xml text", function() {
const xmlData = "rootNode";
const expected = {code: "InvalidChar", msg: "char r is not expected ."};
const expected = {code: "InvalidChar", msg: "char r is not expected."};

const result = validator.validate(xmlData).err;
//console.log(JSON.stringify(result,null,4));
Expand Down Expand Up @@ -390,7 +390,7 @@ describe("XMLParser", function() {
+'<h1></h1>'
+'<?mso-contentType something="val"?>';

var expected = { code: 'InvalidChar', msg: 'char " is not expected .' }
var expected = { code: 'InvalidChar', msg: 'char " is not expected.' }

var result = validator.validate(xmlData).err;
expect(result).toEqual(expected);
Expand Down
2 changes: 1 addition & 1 deletion src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ exports.validate = function(xmlData, options) {
if (xmlData[i] === ' ' || xmlData[i] === '\t' || xmlData[i] === '\n' || xmlData[i] === '\r') {
continue;
}
return {err: {code: 'InvalidChar', msg: 'char ' + xmlData[i] + ' is not expected .'}};
return {err: {code: 'InvalidChar', msg: 'char ' + xmlData[i] + ' is not expected.'}};
}
}

Expand Down