Package com.atlassian.bamboo.utils
Class EscapeChars
- java.lang.Object
-
- com.atlassian.bamboo.utils.EscapeChars
-
public class EscapeChars extends Object
This class provides various character escaping utility methods,
-
-
Constructor Summary
Constructors Constructor Description EscapeChars()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
forFormSubmission(String str)
Escapes strings with application/x-www-form-urlencoded encoding.static @NotNull String
forScriptTag(@NotNull String string)
Escapes content so that it can be safely embedded in a <script> tag in HTML5.static @NotNull String
forUnixShell(@NotNull String s)
Escapes a command line element (argument or command name) so that it's treated as a single token if written to a script file directly.static String
forUrl(String string)
Escapes strings with URL percent encoding.static String
forURL(String queryString)
Deprecated.since 5.11 useforUrl(String)
orforFormSubmission(String)
-
-
-
Method Detail
-
forURL
@Deprecated public static String forURL(String queryString)
Deprecated.since 5.11 useforUrl(String)
orforFormSubmission(String)
Used to ensure that HTTP query strings are in proper form, by escaping special characters such as spaces. This method does form encoding.- Parameters:
queryString
- The string that need to be escaped- Returns:
- The escaped version of the queryString.
-
forFormSubmission
public static String forFormSubmission(String str)
Escapes strings with application/x-www-form-urlencoded encoding.
-
forUnixShell
@NotNull public static @NotNull String forUnixShell(@NotNull @NotNull String s)
Escapes a command line element (argument or command name) so that it's treated as a single token if written to a script file directly.
-
-