-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validator: Fail for stray ampersand characters #215
Conversation
Thanks for your PR @orgads I can see that after this PR we'll be doing 3 more checks per character in the given data which will impact the performance. Hence, I'm looking for options to minimize it. Eg when we find Let me know your opinion on this. |
Done, but I still need to add some unit tests. |
The following: const xmlData = '<name length="bar" length="baz"></name>'; var expected = { code: 'InvalidAttr', msg: "Attribute 'length' is repeated.", line: 1 } var result = validator.validate(xmlData).err; expect(result).toEqual(expected); Can be replaced by: validate('<name length="bar" length="baz"></name>', { InvalidAttr: "Attribute 'length' is repeated." }
@orgads Let me know once you're done. |
I'm done |
Thanks for the effort you spent. |
You're welcome. What about my other PR? |
That PR needs more time to review. As I'm out of the station for 1 more week, I'm not able to finish it. Will do it hopefull by 5th Jan. |
Sure, take your time :) |
Fixes #214
Type