Skip to content

Commit

Permalink
Fix missing validation for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasponce committed Aug 19, 2015
1 parent ef4cff3 commit 619e700
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ public Map<String, String> body(Map<String, String> props, Alert alert) throws E

StringWriter writerPlain = new StringWriter();
StringWriter writerHtml = new StringWriter();
if (plain != null) {
if (plain != null && !plain.isEmpty()) {
ftlTemplate = Template.getPlainTextTemplate("plainTemplate", plain, ftlCfg);
ftlTemplate.process(templateData, writerPlain);
} else {
ftlTemplatePlain.process(templateData, writerPlain);
}
if (html != null) {
if (html != null && !html.isEmpty()) {
ftlTemplate = Template.getPlainTextTemplate("htmlTemplate", html, ftlCfg);
ftlTemplate.process(templateData, writerHtml);
} else {
Expand Down

0 comments on commit 619e700

Please sign in to comment.