Skip to content

Commit

Permalink
fix: raise an error on < in attribute values
Browse files Browse the repository at this point in the history
  • Loading branch information
lddubeau committed Jul 6, 2018
1 parent 2964381 commit 4fd67a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/saxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ class SAXParser {
if (c === "&") {
this.state = S_ATTRIB_VALUE_ENTITY_Q;
}
else if (c === "<") {
this.fail("Invalid character.");
}
else {
this.attribValue += c;
}
Expand Down Expand Up @@ -712,6 +715,9 @@ class SAXParser {
if (c === "&") {
this.state = S_ATTRIB_VALUE_ENTITY_U;
}
else if (c === "<") {
this.fail("Invalid character.");
}
else {
this.attribValue += c;
}
Expand Down

0 comments on commit 4fd67a1

Please sign in to comment.