diff options
author | Tatu Lund <tatu@vaadin.com> | 2019-07-01 14:36:09 +0300 |
---|---|---|
committer | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-02 10:58:27 +0300 |
commit | ca3af82272105fc7585124b9eb1ab76a84cd1df5 (patch) | |
tree | 53a0a7ba4a1a91dd28d282c138aef75f6ce3d17f | |
parent | a723b85680fe28082c9740c3ae26624b9b772d98 (diff) | |
download | vaadin-framework-ca3af82272105fc7585124b9eb1ab76a84cd1df5.tar.gz vaadin-framework-ca3af82272105fc7585124b9eb1ab76a84cd1df5.zip |
Sanitize caption used in Grid header
Cherry pick of https://github.com/vaadin/framework/pull/11644
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Grid.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index c8bdd98b76..cd18891209 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -38,6 +38,7 @@ import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; +import org.jsoup.Jsoup; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; @@ -3424,6 +3425,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, if (caption == null) { caption = ""; // Render null as empty } + caption = Jsoup.parse(caption).text(); state.headerCaption = caption; HeaderRow row = grid.getHeader().getDefaultRow(); |