|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.renderer.v2.components.HtmlEscaper
public final class HtmlEscaper
Method Summary | |
---|---|
static String |
escapeAll(String s,
boolean preserveExistingEntities)
Replaces the HTML "special characters" <, >, ", ', and & with their equivalent entities in HTML 4 and returns the result. |
static String |
escapeAllExceptQuotes(String s,
boolean preserveExistingEntities)
Does the same as escapeAll(String,boolean) , except doesn't replace the quotation mark characters "
and '. |
static String |
escapeAmpersands(String s,
boolean preserveExistingEntities)
Replaces the HTML "special character" & with its equivalent entity in HTML 4 and returns the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String escapeAll(String s, boolean preserveExistingEntities)
Passing true for preserveExistingEntities will try to not break existing entities already found in the input string, by avoiding escaping ampersands which form part of an existing entity like <. Passing false will do the normal behaviour of escaping everything.
s
- the String to escapepreserveExistingEntities
- if true, will avoid escaping the ampersand in an existing entity like
<. If false, the method will do a normal escaping by replace all matched characters.
public static String escapeAllExceptQuotes(String s, boolean preserveExistingEntities)
escapeAll(String,boolean)
, except doesn't replace the quotation mark characters "
and '.
s
- the String to escapepreserveExistingEntities
- if true, will avoid escaping the ampersand in an existing entity like
<. If false, the method will do a normal escaping by replace all matched characters.
public static String escapeAmpersands(String s, boolean preserveExistingEntities)
Passing true for preserveExistingEntities will try to not break existing entities already found in the input string, by avoiding escaping ampersands which form part of an existing entity like <. Passing false will do the normal behaviour of escaping everything.
s
- the String to escapepreserveExistingEntities
- if true, will avoid escaping the ampersand in an existing entity like
<. If false, the method will do a normal escaping by replace all matched characters.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |