OldTruckDriver opened a new pull request, #432: URL: https://github.com/apache/commons-codec/pull/432
[[CODEC-338]](https://issues.apache.org/jira/browse/CODEC-338) PercentCodec loses literal '+' when plusForSpace is enabled. This change makes `PercentCodec` percent-encode a literal `'+'` as `%2B` when `plusForSpace` is enabled. In that mode, decoding treats `'+'` as a space, so leaving a literal plus unescaped made the encoded output ambiguous and broke round-trip behavior. The fix adds `'+'` to the always-encode character set when `plusForSpace` is `true`. Spaces are still encoded as `'+'`, while literal plus signs are preserved as `%2B`. Tests added: - `"a+b c"` encodes to `"a%2Bb+c"` and round-trips. - `"a+b"` encodes to `"a%2Bb"` and round-trips, covering the no-space boundary case. Also updates `src/changes/changes.xml` for CODEC-338. -- 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]
