updates to resolve issue #801

This commit is contained in:
Jeremy Long
2017-07-16 13:15:23 -04:00
parent 4ec8e3bbbb
commit 2ab92a940b
3 changed files with 4 additions and 3 deletions

View File

@@ -159,7 +159,8 @@ public class XmlInputStream extends FilterInputStream {
// Keep it.
pushBack.append(code);
} else {
throw new IOException("Invalid/Unknown reference '&" + reference + ";'");
// invalid entity. Encode the & and append the sequence of chars.
pushBack.append("&").append(reference).append((char) ch);
}
} else {
// Did not terminate properly!