# HG changeset patch # User Daniel Dourvaris # Date 2019-11-06 13:07:09 # Node ID 34d7ca1947c8f7377d92179c88a2c7151b2efa2f # Parent db4eefe41b16bccba9dea481dcd1a3c784a84d25 comments: enable urlify functions on comments in repo/pr scopes. - allows render of !NUM patterns as well as issue tracker patterns. diff --git a/rhodecode/apps/repository/views/repo_commits.py b/rhodecode/apps/repository/views/repo_commits.py --- a/rhodecode/apps/repository/views/repo_commits.py +++ b/rhodecode/apps/repository/views/repo_commits.py @@ -416,7 +416,8 @@ class RepoCommitsView(RepoAppView): text = self.request.POST.get('text') renderer = self.request.POST.get('renderer') or 'rst' if text: - return h.render(text, renderer=renderer, mentions=True) + return h.render(text, renderer=renderer, mentions=True, + repo_name=self.db_repo_name) return '' @LoginRequired() diff --git a/rhodecode/templates/changeset/changeset_file_comment.mako b/rhodecode/templates/changeset/changeset_file_comment.mako --- a/rhodecode/templates/changeset/changeset_file_comment.mako +++ b/rhodecode/templates/changeset/changeset_file_comment.mako @@ -14,7 +14,6 @@ <% outdated_at_ver = comment.older_than_version(getattr(c, 'at_version_num', None)) %> % endif -
- ${h.render(comment.text, renderer=comment.renderer, mentions=True)} + ${h.render(comment.text, renderer=comment.renderer, mentions=True, repo_name=getattr(c, 'repo_name', None))}
diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako --- a/rhodecode/templates/pullrequests/pullrequest_show.mako +++ b/rhodecode/templates/pullrequests/pullrequest_show.mako @@ -166,7 +166,7 @@
-
${h.render(c.pull_request.description, renderer=c.renderer)}
+
${h.render(c.pull_request.description, renderer=c.renderer, repo_name=c.repo_name)}