Class DefaultHtmlSanitizer
- java.lang.Object
-
- org.silverpeas.core.security.html.DefaultHtmlSanitizer
-
- All Implemented Interfaces:
HtmlSanitizer
@Default @Singleton public class DefaultHtmlSanitizer extends Object implements HtmlSanitizer
- Author:
- silveryocha
-
-
Constructor Summary
Constructors Constructor Description DefaultHtmlSanitizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
sanitize(String html)
Sanitizing the given content by keeping: safe formatting safe blocks safe images safe links safe tables safe styles
-
-
-
Method Detail
-
sanitize
public String sanitize(String html)
Description copied from interface:HtmlSanitizer
Sanitizing the given content by keeping:- safe formatting
- safe blocks
- safe images
- safe links
- safe tables
- safe styles
All links are modified in order to be opened safely into a new blank page.
- Specified by:
sanitize
in interfaceHtmlSanitizer
- Parameters:
html
- a string representing an HTML content.- Returns:
- a string representing the sanitized version of given parameter.
-
-