Package overit.geocall.ui.cleaner
Class RtfCleaner
java.lang.Object
overit.geocall.ui.cleaner.Cleaner
overit.geocall.ui.cleaner.RtfCleaner
- All Implemented Interfaces:
Serializable
This class implements the
The sanitization is based on the OWASP libraries
Cleaner object that performs the sanitization that allows to insert
some safe html code just to obtain a minimum of formatting (like bold, italic, paragraphs, etc),
but prevents the insert of active html (such as the scripts).
The active html is recognized and deleted from the string. The sanitization is based on the OWASP libraries
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe string is returned as is, beacuse there's no need to quote symoblssafeCopy()Returns a new instance of the cleaner totally independent of the original, because the cleaning methodology is not thread safeSifts the string to find and remove any html that is more than rtf.
-
Constructor Details
-
RtfCleaner
protected RtfCleaner()
-
-
Method Details
-
safeCopy
Returns a new instance of the cleaner totally independent of the original, because the cleaning methodology is not thread safe -
sift
Sifts the string to find and remove any html that is more than rtf. The html code that is not allowed is recognized and deleted from the string.
Allowed elements and attributes for the cleaner Allowed elements and attributes Formatting b, i, font, s, u, o, sup, sub, ins, del, strong, strike, tt, code, big, small, br, span Blocks p, div, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote -
quote
The string is returned as is, beacuse there's no need to quote symobls
-