public final class HTMLFilter extends Object
此类中的方法非线程安全
String clean = new HTMLFilter().filter(input);
此类来自:http://xss-html-filter.sf.net
Constructor and Description |
---|
HTMLFilter()
Default constructor.
|
HTMLFilter(boolean debug)
Set debug flag to true.
|
HTMLFilter(Map<String,Object> conf)
Map-parameter configurable constructor.
|
Modifier and Type | Method and Description |
---|---|
static String |
chr(int decimal) |
String |
filter(String input)
given a user submitted input String, filter out any invalid or restricted html.
|
static String |
htmlSpecialChars(String s) |
boolean |
isAlwaysMakeTags() |
boolean |
isStripComments() |
public HTMLFilter()
public HTMLFilter(boolean debug)
debug
- turn debug on with a true argumentpublic static String chr(int decimal)
public String filter(String input)
input
- text (i.e. submitted by a user) than may contain htmlpublic boolean isAlwaysMakeTags()
public boolean isStripComments()
Copyright © 2024. All rights reserved.