How to include all the elements in PolicyBuilder in OWASP Java HTML Sanitizer
up vote
0
down vote
favorite
Is there any way to allow everything in the policy and then I would just .disallow() couple of elements and attributes that I know are causing problems.
For example instead of doing "
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements("table", "tr", "td", "href", "body", "th", "font", "button", "input", "select")
i can do
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements(Include all elements)
Note:I don't want to use Antisamy.
html owasp antisamy
add a comment |
up vote
0
down vote
favorite
Is there any way to allow everything in the policy and then I would just .disallow() couple of elements and attributes that I know are causing problems.
For example instead of doing "
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements("table", "tr", "td", "href", "body", "th", "font", "button", "input", "select")
i can do
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements(Include all elements)
Note:I don't want to use Antisamy.
html owasp antisamy
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Is there any way to allow everything in the policy and then I would just .disallow() couple of elements and attributes that I know are causing problems.
For example instead of doing "
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements("table", "tr", "td", "href", "body", "th", "font", "button", "input", "select")
i can do
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements(Include all elements)
Note:I don't want to use Antisamy.
html owasp antisamy
Is there any way to allow everything in the policy and then I would just .disallow() couple of elements and attributes that I know are causing problems.
For example instead of doing "
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements("table", "tr", "td", "href", "body", "th", "font", "button", "input", "select")
i can do
PolicyFactory policy = new HtmlPolicyBuilder()
.allowElements(Include all elements)
Note:I don't want to use Antisamy.
html owasp antisamy
html owasp antisamy
asked Nov 19 at 11:35


SAURAV AGGARWAL
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
This is not possible as OWASP Java HTML Sanitizer is a white-list filter and not a blaklist filter.
By default the sanitizer disallow all, and you must known what you want to you application to receive.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
This is not possible as OWASP Java HTML Sanitizer is a white-list filter and not a blaklist filter.
By default the sanitizer disallow all, and you must known what you want to you application to receive.
add a comment |
up vote
0
down vote
This is not possible as OWASP Java HTML Sanitizer is a white-list filter and not a blaklist filter.
By default the sanitizer disallow all, and you must known what you want to you application to receive.
add a comment |
up vote
0
down vote
up vote
0
down vote
This is not possible as OWASP Java HTML Sanitizer is a white-list filter and not a blaklist filter.
By default the sanitizer disallow all, and you must known what you want to you application to receive.
This is not possible as OWASP Java HTML Sanitizer is a white-list filter and not a blaklist filter.
By default the sanitizer disallow all, and you must known what you want to you application to receive.
answered yesterday
SPoint
986
986
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373801%2fhow-to-include-all-the-elements-in-policybuilder-in-owasp-java-html-sanitizer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown