Skip to content

Commit

Permalink
Handle ] case (FasterXML#100)
Browse files Browse the repository at this point in the history
Write first ] if a sequence of ]] bracktes without a following > is found.
  • Loading branch information
lepokle authored Nov 6, 2024
1 parent df50281 commit 9195653
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/fasterxml/aalto/out/ByteXmlWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,12 @@ protected int writeCDataContents(char[] cbuf, int offset, int len)
// Then new start, and '>'
writeCDataStart();
writeRaw(BYTE_GT);
} else {
// no end found, write first bracket
if (_outputPtr >= _outputBufferLen) {
flushBuffer();
}
_outputBuffer[_outputPtr++] = (byte) ch;
}
continue main_loop;
}
Expand Down

0 comments on commit 9195653

Please sign in to comment.