netliomax25-code opened a new pull request, #2625: URL: https://github.com/apache/groovy/pull/2625
1. AbstractStreamingBuilder.toMapStringClosure builds processing-instruction pseudo-attributes by writing each name and value straight into the `<?...?>` body, so a value holding `?>` closes the PI early and injects sibling markup. This closure backs both StreamingMarkupBuilder and StreamingDOMBuilder. 2. MarkupBuilderHelper.comment wraps its text in `<!-- ... -->` through yieldUnescaped, so text holding `--` closes the comment early the same way. Entity escaping is not legal inside a processing instruction or comment, so the terminating sequence is rejected (`?>` for the PI data, `--` for the comment text) rather than escaped. The builders already escape element text and attribute values, these two bodies were the gap. Regression test added for both, plus a check that ordinary PI/comment content still round-trips. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
