Package org.owasp.validator.html
Class CleanResults
java.lang.Object
org.owasp.validator.html.CleanResults
This class contains the results of a scan.
The list of error messages (
errorMessages
) will let the user
know what, if any HTML errors existed, and what, if any, security or
validation-related errors existed, and what was done about them.- Author:
- Arshan Dabirsiaghi
-
Constructor Summary
ConstructorsConstructorDescriptionCleanResults
(long startOfScan, String cleanHTML, DocumentFragment XMLDocumentFragment, List<String> errorMessages) CleanResults
(long startOfScan, Callable<String> cleanHTML, DocumentFragment XMLDocumentFragment, List<String> errorMessages) -
Method Summary
Modifier and TypeMethodDescriptionReturn the filtered HTML as a String.Return a list of error messages.int
Return the number of errors encountered during filtering.double
Return the time elapsed during the scan.
-
Constructor Details
-
CleanResults
public CleanResults() -
CleanResults
public CleanResults(long startOfScan, String cleanHTML, DocumentFragment XMLDocumentFragment, List<String> errorMessages) -
CleanResults
public CleanResults(long startOfScan, Callable<String> cleanHTML, DocumentFragment XMLDocumentFragment, List<String> errorMessages)
-
-
Method Details
-
getCleanXMLDocumentFragment
-
getCleanHTML
Return the filtered HTML as a String.- Returns:
- A String object which contains the serialized, safe HTML.
-
getErrorMessages
Return a list of error messages.- Returns:
- An ArrayList object which contain the error messages after a scan.
-
getScanTime
public double getScanTime()Return the time elapsed during the scan.- Returns:
- A double primitive indicating the amount of time elapsed between the beginning and end of the scan in seconds.
-
getNumberOfErrors
public int getNumberOfErrors()Return the number of errors encountered during filtering.
-