|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface SeamTextParser.Sanitizer
Sanitization of user input, used to clean links and plain HTML.
Method Summary | |
---|---|
String |
getInvalidAttributeMessage(String elementName,
String attributeName)
|
String |
getInvalidAttributeValueMessage(String elementName,
String attributeName,
String value)
|
String |
getInvalidElementMessage(String elementName)
|
String |
getInvalidURIMessage(String uri)
|
void |
validateHtmlAttribute(antlr.Token element,
antlr.Token attribute)
Called by the SeamTextParser when a plain HTML attribute is parsed. |
void |
validateHtmlAttributeValue(antlr.Token element,
antlr.Token attribute,
String attributeValue)
Called by the SeamTextParser when a plain HTML attribute value is parsed. |
void |
validateHtmlElement(antlr.Token element)
Called by the SeamTextParser when a plain HTML element is parsed. |
void |
validateLinkTagURI(antlr.Token element,
String uri)
Called by the SeamTextParser when a link tag is parsed, i.e. |
Method Detail |
---|
void validateLinkTagURI(antlr.Token element, String uri) throws antlr.SemanticException
element
- the token of the parse tree, here the ">" symbol which comes after the "="uri
- the user-entered link text
antlr.SemanticException
- thrown if the URI is not syntactically or semantically validvoid validateHtmlElement(antlr.Token element) throws antlr.SemanticException
element
- the token of the parse tree, call getText() to access the HTML tag name
antlr.SemanticException
- thrown when the HTML tag is not validvoid validateHtmlAttribute(antlr.Token element, antlr.Token attribute) throws antlr.SemanticException
element
- the token of the parse tree that represents the HTML tagattribute
- the token of the parse tree that represents the HTML attribute
antlr.SemanticException
- thrown if the attribute is not valid for the given HTML tagvoid validateHtmlAttributeValue(antlr.Token element, antlr.Token attribute, String attributeValue) throws antlr.SemanticException
element
- the token of the parse tree that represents the HTML tagattribute
- the token of the parse tree that represents the HTML attributeattributeValue
- the plain string value of the HTML attribute
antlr.SemanticException
- thrown if the attribute value is not valid for the given HTML attribute and elementString getInvalidURIMessage(String uri)
String getInvalidElementMessage(String elementName)
String getInvalidAttributeMessage(String elementName, String attributeName)
String getInvalidAttributeValueMessage(String elementName, String attributeName, String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |