|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.util.BambooStringUtils
public class BambooStringUtils
Method Summary | |
---|---|
static boolean |
containsXssRelatedCharacters(java.lang.String string)
Returns true if the supplied string contains characters that could be used to deface a page or trigger an XSS exploit (characters: "&'<>\). |
static java.lang.String |
encodeHtmlWithTagWhiteList(java.lang.String string)
Escapes string but preserves few defined tags. |
static com.google.common.base.Function<java.lang.String,java.lang.String> |
encodeHtmlWithTagWhiteListFunction()
|
static java.lang.String |
forceAlphaNumeric(java.lang.String str)
|
static java.lang.String |
forceValidHtmlId(java.lang.String id)
According to the HTML standard, ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). |
static java.lang.String |
getFirstXssRelatedCharacter(java.lang.String string)
Retrieves first unsafe character from supplied string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@NotNull public static java.lang.String forceAlphaNumeric(@Nullable java.lang.String str)
public static boolean containsXssRelatedCharacters(@Nullable java.lang.String string)
string
- string to check
@NotNull public static java.lang.String getFirstXssRelatedCharacter(@Nullable java.lang.String string)
string
- the string to check
@NotNull public static java.lang.String forceValidHtmlId(@NotNull java.lang.String id)
public static final java.lang.String encodeHtmlWithTagWhiteList(java.lang.String string)
string
-
public static com.google.common.base.Function<java.lang.String,java.lang.String> encodeHtmlWithTagWhiteListFunction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |