From 2ceeaf89e5ec648de8e1496bdf67352c3edbf41a Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Tue, 29 Aug 2023 09:34:04 +0100 Subject: Escape '<' char before jsoup validation Signed-off-by: MichaelMorris Issue-ID: SDC-4606 Change-Id: I3ef6f1c63dd8e86e0ed97ce4c0ba69339dd7d44a --- .../src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common-app-api/src') diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java index 38d4e7d79b..31f866e232 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java @@ -32,6 +32,6 @@ public class NoHtmlValidator implements ConstraintValidator { @Override public boolean isValid(String value, ConstraintValidatorContext ctx) { - return value == null || Jsoup.isValid(value, Safelist.none()); + return value == null || Jsoup.isValid(Jsoup.parseBodyFragment(value).body().html(), Safelist.none()); } } -- cgit 1.2.3-korg