diff --git a/backend/src/main/java/io/metersphere/notice/service/MailService.java b/backend/src/main/java/io/metersphere/notice/service/MailService.java index 015746fbb1..a47ca07e68 100644 --- a/backend/src/main/java/io/metersphere/notice/service/MailService.java +++ b/backend/src/main/java/io/metersphere/notice/service/MailService.java @@ -15,7 +15,8 @@ import io.metersphere.track.request.testreview.SaveCommentRequest; import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest; import org.apache.commons.collections4.MapUtils; import org.apache.commons.io.IOUtils; -import org.flywaydb.core.internal.util.StringUtils; +import org.apache.commons.lang3.RegExUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.mail.MailException; import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; @@ -96,11 +97,11 @@ public class MailService { private String getContent(String template, Map context) { if (MapUtils.isNotEmpty(context)) { - context.forEach((k, v) -> { - if (v != null && !v.isEmpty()) { - StringUtils.replaceAll(template, "${" + k + "}", v); + for (String k : context.keySet()) { + if (StringUtils.isNotBlank(context.get(k))) { + template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", context.get(k)); } - }); + } } return template; } diff --git a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue index 2d73f59ab4..9b1c4977c4 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue @@ -28,7 +28,6 @@ :placeholder="$t('test_track.plan.input_plan_project')" multiple style="width: 100%" - collapse-tags filterable>