Skip to content

Commit

Permalink
Fix AMBIGUOUS_AMPERSAND state
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Aug 10, 2020
1 parent a3d911d commit 61325c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/nu/validator/htmlparser/impl/Tokenizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3546,13 +3546,14 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
} else if ((c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z')) {
if (++pos == endPos) {
break stateloop;
}
appendCharRefBuf(c);
emitOrAppendCharRefBuf(returnState);
if ((returnState & DATA_AND_RCDATA_MASK) == 0) {
cstart = pos;
}
if (++pos == endPos) {
break stateloop;
}
c = checkChar(buf, pos);
continue;
}
Expand Down

0 comments on commit 61325c3

Please sign in to comment.