com.liferay.portal.util
Class HtmlImpl
java.lang.Object
com.liferay.portal.util.HtmlImpl
- All Implemented Interfaces:
- Html
public class HtmlImpl
- extends Object
- implements Html
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ESCAPE_MODE_ATTRIBUTE
public static final int ESCAPE_MODE_ATTRIBUTE
- See Also:
- Constant Field Values
ESCAPE_MODE_CSS
public static final int ESCAPE_MODE_CSS
- See Also:
- Constant Field Values
ESCAPE_MODE_JS
public static final int ESCAPE_MODE_JS
- See Also:
- Constant Field Values
ESCAPE_MODE_TEXT
public static final int ESCAPE_MODE_TEXT
- See Also:
- Constant Field Values
ESCAPE_MODE_URL
public static final int ESCAPE_MODE_URL
- See Also:
- Constant Field Values
HtmlImpl
public HtmlImpl()
escape
public String escape(String text)
- Escapes the text so that it is safe to use in an HTML context.
- Specified by:
escape
in interface Html
- Parameters:
text
- the text to escape
- Returns:
- the escaped HTML text, or
null
if the text is
null
escape
public String escape(String text,
int type)
- Specified by:
escape
in interface Html
escapeAttribute
public String escapeAttribute(String attribute)
- Specified by:
escapeAttribute
in interface Html
escapeCSS
public String escapeCSS(String css)
- Specified by:
escapeCSS
in interface Html
escapeHREF
public String escapeHREF(String href)
- Specified by:
escapeHREF
in interface Html
escapeJS
public String escapeJS(String js)
- Specified by:
escapeJS
in interface Html
escapeURL
public String escapeURL(String url)
- Specified by:
escapeURL
in interface Html
escapeXPath
public String escapeXPath(String xPath)
- Specified by:
escapeXPath
in interface Html
escapeXPathAttribute
public String escapeXPathAttribute(String xPathAttribute)
- Specified by:
escapeXPathAttribute
in interface Html
extractText
public String extractText(String html)
- Specified by:
extractText
in interface Html
fromInputSafe
public String fromInputSafe(String text)
- Specified by:
fromInputSafe
in interface Html
getAUICompatibleId
public String getAUICompatibleId(String text)
- Specified by:
getAUICompatibleId
in interface Html
render
@Deprecated
public String render(String html)
- Deprecated.
- Specified by:
render
in interface Html
replaceMsWordCharacters
public String replaceMsWordCharacters(String text)
- Specified by:
replaceMsWordCharacters
in interface Html
replaceNewLine
public String replaceNewLine(String text)
- Specified by:
replaceNewLine
in interface Html
stripBetween
public String stripBetween(String text,
String tag)
- Specified by:
stripBetween
in interface Html
stripComments
public String stripComments(String text)
- Specified by:
stripComments
in interface Html
stripHtml
public String stripHtml(String text)
- Specified by:
stripHtml
in interface Html
toInputSafe
public String toInputSafe(String text)
- Specified by:
toInputSafe
in interface Html
unescape
public String unescape(String text)
- Specified by:
unescape
in interface Html
unescapeCDATA
public String unescapeCDATA(String text)
- Specified by:
unescapeCDATA
in interface Html
wordBreak
public String wordBreak(String text,
int columns)
- Specified by:
wordBreak
in interface Html
isTag
protected boolean isTag(char[] tag,
String text,
int pos)
stripTag
protected int stripTag(char[] tag,
String text,
int pos)