Commits

Marcin Kuzminski committed 566f016

yet another fix for commit linkifications

Comments (0)

Files changed (1)

rhodecode/lib/helpers.py

 
 
 def urlify_text(text_):
-    import re
 
     url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'''
                          '''|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)''')
     :param text_:
     :param repository:
     """
-    import re
+
     URL_PAT = re.compile(r'([0-9a-fA-F]{12,})')
 
     def url_func(match_obj):
     :param repository:
     :param link_: changeset link
     """
-    import re
     import traceback
 
     def escaper(string):
         if link_:
             # wrap not links into final link => link_
             newtext = linkify_others(newtext, link_)
-
-            return literal(newtext)
     except:
         log.error(traceback.format_exc())
         pass
 
-    return newtext
+    return literal(newtext)
 
 
 def rst(source):