Skip to content

Commit 2447729

Browse files
Flush w/ emitOrAppendCharRefBuf, not ad-hoc code
1 parent 19d2492 commit 2447729

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/nu/validator/htmlparser/impl/Tokenizer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,10 +3546,9 @@ private void ensureBufferSpace(int inputLength) throws SAXException {
35463546
} else if ((c >= '0' && c <= '9')
35473547
|| (c >= 'A' && c <= 'Z')
35483548
|| (c >= 'a' && c <= 'z')) {
3549-
if (returnState == ATTRIBUTE_VALUE_DOUBLE_QUOTED
3550-
|| returnState == ATTRIBUTE_VALUE_SINGLE_QUOTED
3551-
|| returnState == ATTRIBUTE_VALUE_UNQUOTED) {
3552-
appendStrBuf(c);
3549+
emitOrAppendCharRefBuf(returnState);
3550+
if ((returnState & DATA_AND_RCDATA_MASK) == 0) {
3551+
cstart = pos;
35533552
}
35543553
/* The following pos++ is necessary due to how we’ve
35553554
* handled the "reconsume" block for this case. */

0 commit comments

Comments
 (0)