OldTruckDriver opened a new pull request, #433:
URL: https://github.com/apache/commons-codec/pull/433

   [[CODEC-339]](https://issues.apache.org/jira/browse/CODEC-339) URLCodec 
custom safe sets can emit URL encoding control characters.
   
   This change keeps `%` and `+` percent-encoded in `URLCodec.encodeUrl(BitSet, 
byte[])` even when a caller-provided safe-character `BitSet` marks them as safe.
   
   `decodeUrl(byte[])` treats `%` as the escape prefix and `+` as a space. 
Allowing `encodeUrl(...)` to emit those bytes literally can produce undecodable 
output (`%`) or break round-trip behavior (`+` decodes as space). This patch 
preserves those characters as URL-encoding syntax and documents that they are 
always escaped.
   
   Tests added:
   - `%` marked safe still encodes as `%25` and decodes back to `%`.
   - `+` marked safe still encodes as `%2B` and decodes back to `+`.
   
   Also updates `src/changes/changes.xml` for CODEC-339.


-- 
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]

Reply via email to