diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py
--- a/kallithea/lib/helpers.py
+++ b/kallithea/lib/helpers.py
@@ -1402,9 +1402,10 @@ def _mentions_replace(match_obj):
return '@%s' % match_obj.group(1)
-def render_w_mentions(source):
+def render_w_mentions(source, repo_name=None):
"""
- Render plain text with @mention highlighting.
+ Render plain text with revision hashes and issue references urlified
+ and with @mention highlighting.
"""
s = source.rstrip()
s = safe_unicode(s)
@@ -1413,6 +1414,9 @@ def render_w_mentions(source):
# this sequence of html-ifications seems to be safe and non-conflicting
# if the issues regexp is sane
s = _urlify_text(s)
+ if repo_name is not None:
+ s = urlify_changesets(s, repo_name)
+ s = urlify_issues(s, repo_name)
s = MENTIONS_REGEX.sub(_mentions_replace, s)
return literal('%s' % s)
diff --git a/kallithea/model/notification.py b/kallithea/model/notification.py
--- a/kallithea/model/notification.py
+++ b/kallithea/model/notification.py
@@ -59,7 +59,7 @@ class NotificationModel(BaseModel):
def create(self, created_by, subject, body, recipients=None,
type_=Notification.TYPE_MESSAGE, with_email=True,
- email_kwargs=None):
+ email_kwargs=None, repo_name=None):
"""
Creates notification of given type
@@ -123,7 +123,7 @@ class NotificationModel(BaseModel):
## this is passed into template
html_kwargs = {
'subject': subject,
- 'body': h.render_w_mentions(body),
+ 'body': h.render_w_mentions(body, repo_name),
'when': h.fmt_date(notif.created_on),
'user': notif.created_by_user.username,
}
diff --git a/kallithea/templates/changeset/changeset_file_comment.html b/kallithea/templates/changeset/changeset_file_comment.html
--- a/kallithea/templates/changeset/changeset_file_comment.html
+++ b/kallithea/templates/changeset/changeset_file_comment.html
@@ -40,7 +40,7 @@
%endif
%if co.text:
- ${h.render_w_mentions(co.text)|n}
+ ${h.render_w_mentions(co.text, c.repo_name)|n}
%endif