Skip to content

Commit

Permalink
fix: ensure ill-formed PIs are parsed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Apr 10, 2022
1 parent 6fe9b53 commit a800fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/cyberneko/html/HTMLScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ protected void scanPI() throws IOException {
if (c == '?' || c == '/') {
char c0 = (char)c;
c = fCurrentEntity.read();
if (c == '>') {
if (c == '>' || c == -1) {
break;
}
fStringBuffer.append(c0);
Expand Down

0 comments on commit a800fce

Please sign in to comment.