|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.html.HtmlUtil
Helper Class for HTML-Resources
Field Summary | |
static CharacterConverter |
converter
The Converter instance used by the framework to convert Strings into HTML representation. |
Constructor Summary | |
private |
HtmlUtil()
Constructor |
Method Summary | |
static java.lang.String |
encodeAttribute(java.lang.Object obj)
Method encodeAttribute |
static java.lang.String |
encodeAttribute(java.lang.Object raw,
boolean filter)
Converts a String to an equivalent HTML-String |
static java.lang.String |
encodeHtml(java.lang.Object obj)
Method encodeHtml |
static java.lang.String |
encodeHtml(java.lang.Object raw,
boolean filter)
Converts a String to an equivalent HTML-String |
private static java.lang.String |
encodeInternAttribute(java.lang.String source)
Method encodeAttribute |
private static java.lang.String |
encodeInternHtml(java.lang.String source)
Method encodeHtml |
static java.lang.String |
encodeTextarea(java.lang.String source)
This method replaces every occurrence of & |
static java.lang.String |
encodeUrl(java.lang.String str)
Method encodeUrl |
static java.lang.String |
removeHtml(java.lang.Object html)
Removes all HTML formatting from the given HTML-String |
static java.lang.String |
removeHtml(java.lang.Object html,
boolean filter)
Removes all HTML formatting from the given HTML-String depending on the filter setting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static CharacterConverter converter
Constructor Detail |
private HtmlUtil()
Method Detail |
public static java.lang.String removeHtml(java.lang.Object html)
html
- Object in HTML format
public static java.lang.String removeHtml(java.lang.Object html, boolean filter)
html
- Object in HTML formatfilter
- The HTML filter setting of the control
true
we assume the control
converts from raw text to HTML. So the given string is already
in plain text format and there is nothing to do.false
we assume the control
does not convert to HTML because the string resources are
already given in HTML format. So we need to strip off all HTML
tags.public static final java.lang.String encodeHtml(java.lang.Object obj)
obj
- Object
public static final java.lang.String encodeHtml(java.lang.Object raw, boolean filter)
raw
- Objectfilter
- Filter
private static final java.lang.String encodeInternHtml(java.lang.String source)
source
- String to encode
public static final java.lang.String encodeAttribute(java.lang.Object obj)
obj
- Object
public static final java.lang.String encodeAttribute(java.lang.Object raw, boolean filter)
raw
- Objectfilter
- Filter
private static final java.lang.String encodeInternAttribute(java.lang.String source)
source
- String to encode
public static final java.lang.String encodeTextarea(java.lang.String source)
& into &
- Parameters:
source
- String to encode
- Returns:
- encoded String
public static final java.lang.String encodeUrl(java.lang.String str)
str
- URL
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |