Package overit.geocall.ui.cleaner
Class HtmlCleaner
java.lang.Object
overit.geocall.ui.cleaner.Cleaner
overit.geocall.ui.cleaner.HtmlCleaner
- All Implemented Interfaces:
Serializable
This class implements the
This type of cleaner must be used only in very special cases where there is the actual need to introduce complex html. In other cases it is recommended to use the
The sanitization is based on the OWASP libraries
Cleaner object that performs the sanitization that allows to insert
safe html code, but prevents the insert of active html (such as the scripts).
The active html is recognized and deleted from the string. This type of cleaner must be used only in very special cases where there is the actual need to introduce complex html. In other cases it is recommended to use the
RtfCleaner. 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 insecure substrings.
-
Constructor Details
-
HtmlCleaner
protected HtmlCleaner()
-
-
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 insecure substrings. The active html is recognized and deleted from the string.
Allowed elements and attributes for the cleaner Allowed elements and attributes Global class, id, lang, title Tables table, tbody, thead, tfoot, tr, td, th, caption, col, colgroup, align, bgcolor, border, cellpadding, cellspacing, width, colspan, rowspan, valign, height, nowrap Blocks p, div, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote Styling color, font-size, type-face inside the style="" attributes Formatting hr, b, i, font, s, u, o, sup, sub, ins, del, strong, strike, tt, code, big, small, br, span Url protocols cid, http, https, mailto Images src, alt, width, height, vspace, hspace, border, align, dir, longdesc Links a, href, target, name -
quote
The string is returned as is, beacuse there's no need to quote symobls
-