diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodesValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodesValidator.java index 9e44acf5..837092c3 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodesValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodesValidator.java @@ -120,7 +120,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) callback.addMessage(mes); } - if(!HtmlUtil.isValid(cd.comments)) { + if(cd.comments!=null && !cd.comments.isEmpty() && !HtmlUtil.isValid(cd.comments)) { cd.comments=HtmlUtil.clean(cd.comments, "UTF-8"); GinasProcessingMessage mes = GinasProcessingMessage .WARNING_MESSAGE(