Fix URI var encoding issue with '$'
When expanding and strictly encoding URI variables, there is no need to quote `/` and `$` which will be encoded anyway. Issue: SPR-17168
This commit is contained in:
@@ -74,6 +74,12 @@ public class UriComponentsTests {
|
||||
assertEquals("/hotel%20list/Z%C3%BCrich%20specials?q=a%2Bb", uri.expand("a+b").toString());
|
||||
}
|
||||
|
||||
@Test // SPR-17168
|
||||
public void encodeAndExpandWithDollarSign() {
|
||||
UriComponents uri = UriComponentsBuilder.fromPath("/path").queryParam("q", "{value}").encode().build();
|
||||
assertEquals("/path?q=JavaClass%241.class", uri.expand("JavaClass$1.class").toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void toUriEncoded() throws URISyntaxException {
|
||||
UriComponents uriComponents = UriComponentsBuilder.fromUriString(
|
||||
|
||||
Reference in New Issue
Block a user