|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.owasp.validator.html.model.Tag
public class Tag
A model for HTML "tags" and the rules dictating their validation/filtration. Also contains information about their allowed attributes. There is also some experimental (unused) code in here for generating a valid regular expression according to a policy file on a per-tag basis.
| Constructor Summary | |
|---|---|
Tag(java.lang.String name)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addAttribute(Attribute attr)
Adds a fully-built Attribute to the list of Attributes allowed for this tag. |
java.lang.String |
getAction()
|
java.util.HashMap |
getAllowedAttributes()
|
Attribute |
getAttributeByName(java.lang.String name)
Returns an Attribute associated with a lookup name. |
java.lang.String |
getName()
|
java.lang.String |
getRegularExpression()
Returns a regular expression for validating individual tags. |
void |
setAction(java.lang.String action)
|
void |
setAllowedAttributes(java.util.HashMap allowedAttributes)
|
void |
setName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Tag(java.lang.String name)
name - The name of the tag, such as "b" for <b> tags.| Method Detail |
|---|
public java.lang.String getAction()
filter, validate or remove.public void setAction(java.lang.String action)
action - The new action for this tag which is one of filter, validate or remove.public void addAttribute(Attribute attr)
attr - The Attribute to add to the list of allowed Attributes.public java.lang.String getRegularExpression()
public java.util.HashMap getAllowedAttributes()
HashMap of allowed attributes that the tag is allowed to contain.public void setAllowedAttributes(java.util.HashMap allowedAttributes)
allowedAttributes - The new HashMap of allowed attributes that the tag is allowed to contain.public java.lang.String getName()
public void setName(java.lang.String name)
name - The new name of the tag.public Attribute getAttributeByName(java.lang.String name)
Attribute associated with a lookup name.
name - The name of the allowed attribute by name.
Attribute object associated with the name, or
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||