|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.loom.util.HtmlSanitizer
public class HtmlSanitizer
Replace invalid characters of a string. Escapes quotation (") and start of tag character (<) to prevent manipulation of tag attributes and elements in the HTML code. For details on this, see: http://code.google.com/docreader/#p(doctype)s(doctype)t(ArticlesXSS)
| Constructor Summary | |
|---|---|
HtmlSanitizer()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
replaceIllegalAttributeChars(java.lang.String value,
int index)
Replace all illegal characters with valid string representations |
static java.lang.String |
sanitize(java.lang.String s)
|
protected java.lang.String |
sanitizeImpl(java.lang.String value)
Replace illegal characters in a value. |
static java.lang.String |
stripTags(java.lang.String value)
Removes all tags from the supplied String argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlSanitizer()
| Method Detail |
|---|
protected java.lang.String sanitizeImpl(java.lang.String value)
protected java.lang.String replaceIllegalAttributeChars(java.lang.String value,
int index)
index - indfex of the first failed characterpublic static java.lang.String stripTags(java.lang.String value)
public static java.lang.String sanitize(java.lang.String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||