|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.owasp.validator.css.CssScanner
public class CssScanner
Encapsulates the parsing and validation of a CSS stylesheet or inline
declaration. To make use of this class, instantiate the scanner with the
desired policy and call either scanInlineSheet() or
scanStyleSheet as appropriate.
#scanInlineStyle(String, String),
#scanStyleSheet(String)| Constructor Summary | |
|---|---|
CssScanner(Policy policy,
java.util.ResourceBundle messages)
Constructs a scanner based on the given policy. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Deprecated. |
CleanResults |
scanInlineStyle(java.lang.String taintedCss,
java.lang.String tagName,
int sizeLimit)
Scans the contents of an inline style declaration (ex. |
CleanResults |
scanStyleSheet(java.lang.String taintedCss,
int sizeLimit)
Scans the contents of a full stylesheet (ex. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CssScanner(Policy policy,
java.util.ResourceBundle messages)
policy - the policy to follow when scanning| Method Detail |
|---|
public CleanResults scanStyleSheet(java.lang.String taintedCss,
int sizeLimit)
throws ScanException
taintedCss - a String containing the contents of the
CSS stylesheet to validatesizeLimit - the limit on the total size in bytes of any imported
stylesheets
CleanResuts object containing the results of
the scan
ScanException - if an error occurs during scanning
public CleanResults scanInlineStyle(java.lang.String taintedCss,
java.lang.String tagName,
int sizeLimit)
throws ScanException
CssScanner's policy file.
taintedCss - a String containing the contents of the
CSS stylesheet to validatetagName - the name of the tag for which this inline style was
declaredsizeLimit - the limit on the total size in bites of any imported
stylesheets
CleanResuts object containing the results of
the scan
ScanException - if an error occurs during scanning
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - unused
java.lang.Exception - if any error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||