diff options
author | MichaelMorris <michael.morris@est.tech> | 2023-08-29 09:34:04 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2023-08-29 10:49:42 +0000 |
commit | 2ceeaf89e5ec648de8e1496bdf67352c3edbf41a (patch) | |
tree | 315189daf1cc02584fc468d891a763b39a0205de /common-app-api/src/main | |
parent | e5ce5b1b72e9421ba4bb772c41215e837f7517dd (diff) |
Escape '<' char before jsoup validation
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4606
Change-Id: I3ef6f1c63dd8e86e0ed97ce4c0ba69339dd7d44a
Diffstat (limited to 'common-app-api/src/main')
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/common/util/NoHtmlValidator.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<NoHtml, String> { @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()); } } |