public class ContainerUtils extends Object
| Constructor and Description |
|---|
ContainerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encodeUnsafeCharacters(String originalQueryString)
Encodes (predefined subset of) unsafe/unwise URI characters with the percent-encoding.
|
public static String encodeUnsafeCharacters(String originalQueryString)
Replaces the predefined set of unsafe URI characters in the query string with its percent-encoded counterparts. The reserved characters (as defined by the RFC) are automatically encoded by browsers, but some characters are in the "gray zone" - are not explicitly forbidden, but not recommended and known to cause issues.
Currently, the method only encodes the curly brackets (\{} and {@code \}),
if any, to allow URI request parameters to contain JSON.
originalQueryString - URI query string (the part behind the question mark character).Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.