Switch handleXmlAttributeQuoted to use currentPointOrEnd, so it can't walk off the end of the text -- this is a spinoff that came up in []
Also add a test to good_html_attributes that would fail once [] goes in (w/o this change).
GITHUB_BREAKING_CHANGES=NA
@@ -760,7 +760,7 @@ final class HtmlRewriter {
boolean foundQuote = advanceWhileMatches(doubleQuoted ? NOT_DOUBLE_QUOTE : NOT_SINGLE_QUOTE);
if (foundQuote) {
advance();
- context.setState(State.XML_DECLARATION, currentPoint());
+ context.setState(State.XML_DECLARATION, currentPointOrEnd());
}
}
