Skip to content

Commit

Permalink
docs: remove mention of no longer existing setLabelAsHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Sep 28, 2024
1 parent 4eaf46a commit fd21ba9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions articles/flow/security/advanced-topics/vulnerabilities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ div.setTitle("<b>This won't be bolded either.</b>");
// These aren't safe
div.getElement().setProperty("innerHTML", "<b>This IS bolded.</b>");
div.add(new Html("<b>This IS bolded.</b>"));
new Checkbox().setLabelAsHtml("<b>This is bolded too.</b>");
----

// tag::xss-with-helper[]
Expand All @@ -149,7 +147,8 @@ You can use helpers to mitigate the risk when data isn't trusted. Here's an exam
[source,java]
----
String safeHtml = Jsoup.clean(dangerousText, Whitelist.relaxed());
new Checkbox().setLabelAsHtml(safeHtml);
Div div = new Div();
div.add(new Html(safeHtml));
----


Expand Down

0 comments on commit fd21ba9

Please sign in to comment.