[SPR-17621] HierarchicalUriComponents.encodeUriComponent() method can not encode Pchar Created: 22/Dec/18 Updated: 15/Jan/19 Resolved: 23/Dec/18
|Resolution:||Works as Designed||Votes:||0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Attachments:||1.jpg 2.jpg 3.jpg|
|Days since last comment:||1 year, 1 week, 4 days ago|
|Last commented by a User:||true|
I have a question about HierarchicalUriComponents.encodeUriComponent() method. I think it should encode all special char in url query param, Actually, It can not encode many special char. For example + - ! $ ... in url query param. and my email is email@example.com .
|Comment by Brian Clozel [ 23/Dec/18 ]|
Did you take a loot at the RFC that's referenced from the implementation here?
The RFC 3986 states that the following characters are allowed in a query string (see the appendix A in the ABNF):
This means that sub-delimiters are allowed in query strings and do not need to be percent encoded (that includes +, $).
Now I understand that some legal characters might still have a special meaning. We've applied some changes to be more consistent with the encoding of URLs (see
|Comment by sunbufu [ 23/Dec/18 ]|
Got it. Thanks very much.
|Comment by Spring Issuemaster [ 14/Jan/19 ]|