Package org.owasp.validator.html.scan
Class MagicSAXFilter
- java.lang.Object
-
- org.cyberneko.html.filters.DefaultFilter
-
- org.owasp.validator.html.scan.MagicSAXFilter
-
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponent,org.apache.xerces.xni.parser.XMLDocumentFilter,org.apache.xerces.xni.parser.XMLDocumentSource,org.apache.xerces.xni.XMLDocumentHandler,org.cyberneko.html.HTMLComponent
public class MagicSAXFilter extends org.cyberneko.html.filters.DefaultFilter implements org.apache.xerces.xni.parser.XMLDocumentFilterImplementation of an HTML-filter that adheres to an AntiSamy policy. This filter is SAX-based which means it is much more memory-efficient and also a bit faster than the DOM-based implementation.
-
-
Constructor Summary
Constructors Constructor Description MagicSAXFilter(java.util.ResourceBundle messages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)voidcomment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)voiddoctypeDecl(java.lang.String root, java.lang.String publicId, java.lang.String systemId, org.apache.xerces.xni.Augmentations augs)voidemptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)voidendCDATA(org.apache.xerces.xni.Augmentations augs)voidendElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs)java.util.List<java.lang.String>getErrorMessages()voidprocessingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs)voidreset(InternalPolicy instance)voidstartCDATA(org.apache.xerces.xni.Augmentations augs)voidstartElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)-
Methods inherited from class org.cyberneko.html.filters.DefaultFilter
endDocument, endGeneralEntity, endPrefixMapping, getDocumentHandler, getDocumentSource, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, ignorableWhitespace, merge, reset, setDocumentHandler, setDocumentSource, setFeature, setProperty, startDocument, startDocument, startGeneralEntity, startPrefixMapping, textDecl, xmlDecl
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
reset
public void reset(InternalPolicy instance)
-
characters
public void characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
charactersin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
charactersin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
comment
public void comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
commentin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
commentin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
doctypeDecl
public void doctypeDecl(java.lang.String root, java.lang.String publicId, java.lang.String systemId, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
doctypeDeclin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
doctypeDeclin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
emptyElement
public void emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
emptyElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
emptyElementin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
endElement
public void endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
endElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
endElementin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
processingInstruction
public void processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
processingInstructionin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
processingInstructionin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
startCDATA
public void startCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
startCDATAin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startCDATAin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
endCDATA
public void endCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
endCDATAin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
endCDATAin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
startElement
public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException- Specified by:
startElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startElementin classorg.cyberneko.html.filters.DefaultFilter- Throws:
org.apache.xerces.xni.XNIException
-
getErrorMessages
public java.util.List<java.lang.String> getErrorMessages()
-
-