Package com.atlassian.bamboo.utils
Class EscapeChars
java.lang.Object
com.atlassian.bamboo.utils.EscapeChars
This class provides various character escaping utility methods,
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Escapes strings with URL percent encoding.static String
Deprecated.
-
Constructor Details
-
EscapeChars
public EscapeChars()
-
-
Method Details
-
forURL
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.
-
forUrl
Escapes strings with URL percent encoding. -
forFormSubmission
Escapes strings with application/x-www-form-urlencoded encoding. -
forUnixShell
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. -
forScriptTag
Escapes content so that it can be safely embedded in a <script> tag in HTML5.
-
forUrl(String)
orforFormSubmission(String)