diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py
--- a/kallithea/lib/helpers.py
+++ b/kallithea/lib/helpers.py
@@ -1052,8 +1052,7 @@ def render_w_mentions(source, repo_name=
Render plain text with revision hashes and issue references urlified
and with @mention highlighting.
"""
- s = safe_str(source)
- s = urlify_text(s, repo_name=repo_name)
+ s = urlify_text(source, repo_name=repo_name)
return literal('
%s
' % s)
diff --git a/kallithea/lib/markup_renderer.py b/kallithea/lib/markup_renderer.py
--- a/kallithea/lib/markup_renderer.py
+++ b/kallithea/lib/markup_renderer.py
@@ -36,7 +36,7 @@ import markdown as markdown_mod
from docutils.core import publish_parts
from docutils.parsers.rst import directives
-from kallithea.lib.utils2 import MENTIONS_REGEX, safe_str
+from kallithea.lib.utils2 import MENTIONS_REGEX
log = logging.getLogger(__name__)
@@ -156,7 +156,6 @@ class MarkupRenderer(object):
>>> MarkupRenderer.plain('https://example.com/')
'
https://example.com/'
"""
- source = safe_str(source)
if universal_newline:
newline = '\n'
source = newline.join(source.splitlines())
@@ -197,7 +196,6 @@ class MarkupRenderer(object):
"""
- source = safe_str(source)
try:
if flavored:
source = cls._flavored_markdown(source)
@@ -215,7 +213,6 @@ class MarkupRenderer(object):
@classmethod
def rst(cls, source, safe=True):
- source = safe_str(source)
try:
docutils_settings = dict([(alias, None) for alias in
cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])