Skip to content

Commit a800fce

Browse files
committed
fix: ensure ill-formed PIs are parsed correctly
1 parent 6fe9b53 commit a800fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/org/cyberneko/html/HTMLScanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ protected void scanPI() throws IOException {
25882588
if (c == '?' || c == '/') {
25892589
char c0 = (char)c;
25902590
c = fCurrentEntity.read();
2591-
if (c == '>') {
2591+
if (c == '>' || c == -1) {
25922592
break;
25932593
}
25942594
fStringBuffer.append(c0);

0 commit comments

Comments
 (0)