Skip to content

Commit

Permalink
Merge branch 'relaxed_markup-checker' into update_v6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bjosel committed Jul 16, 2024
2 parents b736a23 + f978592 commit 136beee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public static String sanitizeBasicHTML(String unsafe) {
// basic includes: a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul
//Whitelist wl = Whitelist.basic().addTags("img", "h1", "h2", "h3", "kbd", "hr", "s", "del");

Safelist sl = Safelist.basicWithImages().addTags("h1", "h2", "h3", "kbd", "hr", "s", "del", "map", "area").addAttributes("img", "usemap")
.addAttributes("map", "name").addAttributes("area", "shape", "coords", "href", "title", "alt")
Safelist sl = Safelist.basicWithImages().addTags("h1", "h2", "h3", "kbd", "hr", "s", "del", "map", "area").addAttributes("img", "usemap", "style")
.addAttributes("map", "name").addAttributes("area", "shape", "coords", "href", "title", "alt").addAttributes("ol", "type")
.addEnforcedAttribute("a", "target", "_blank");

return Jsoup.clean(unsafe, sl);
Expand Down

0 comments on commit 136beee

Please sign in to comment.