You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "netliomax25-code (via GitHub)" <gi...@apache.org> on 2026/07/17 19:31:32 UTC

[PR] reject lone low surrogate in StreamingMarkupWriter.write [groovy]

netliomax25-code opened a new pull request, #2717:
URL: https://github.com/apache/groovy/pull/2717

   Repro: write a lone low surrogate (a `\uDC00`-`\uDFFF` char with no preceding high surrogate) through StreamingMarkupBuilder, e.g. `new StreamingMarkupBuilder().bind { mkp.yield '\uDC00' }`.
   Cause: the low-surrogate branch in `write(int)` assumes a high surrogate was already buffered, so it reads `surrogatePair.charAt(0)` (the low surrogate itself) and emits a numeric character reference for an unrelated code point (`\uDC00` becomes `&#x10000;`) instead of failing.
   Fix: reject a low surrogate that is not preceded by a high surrogate, matching the existing rejection of a high surrogate not followed by a low one.
   


-- 
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: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] reject lone low surrogate in StreamingMarkupWriter.write [groovy]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #2717:
URL: https://github.com/apache/groovy/pull/2717#issuecomment-5010026765

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 6f69bc66da9d33442e12031466d30a88991f3c2c
   ▶️ Tests:  104124 executed
   ⚪️ Checks: 23/23 completed
   
   ---
   _Learn more about TestLens at [testlens.app](https://testlens.app)._
   


-- 
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: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] reject lone low surrogate in StreamingMarkupWriter.write [groovy]

Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert closed pull request #2717: reject lone low surrogate in StreamingMarkupWriter.write
URL: https://github.com/apache/groovy/pull/2717


-- 
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: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] reject lone low surrogate in StreamingMarkupWriter.write [groovy]

Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert commented on PR #2717:
URL: https://github.com/apache/groovy/pull/2717#issuecomment-5054759580

   Merged as GROOVY-12186. Thanks!


-- 
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: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org