Skip to content

Commit

Permalink
mail: Remove header-anchor link from mail body
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Mar 14, 2017
1 parent a53b610 commit ae653a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/NotificationMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private static void sendMail(INotificationEvent event, Set<MailRecipient> toList
IssueComment issueComment = IssueComment.find.byId(Long.valueOf(resource.getId()));
resource = issueComment.issue.asResource();
}
email.setHtmlMsg(getHtmlMessage(lang, message, urlToView, resource, acceptsReply));
email.setHtmlMsg(removeHeadAnchor(getHtmlMessage(lang, message, urlToView, resource, acceptsReply)));
email.setTextMsg(getPlainMessage(lang, message, Url.create(urlToView), acceptsReply));

email.addReferences();
Expand All @@ -547,6 +547,10 @@ private static void sendMail(INotificationEvent event, Set<MailRecipient> toList
}
}

private static String removeHeadAnchor(String htmlText) {
return htmlText.replaceAll("head-anchor\">#</a>", "></a>");
}

@Nullable
public static String getReplyTo(Resource resource) {
if (resource == null) {
Expand Down

0 comments on commit ae653a2

Please sign in to comment.