Commits

Marcin Kuzminski committed 122f15a

fixed issue with escaping < and > in changeset commits

Comments (0)

Files changed (2)

docs/changelog.rst

 - fixed #390 cache invalidation problems on repos inside group
 - fixed #385 clone by ID url was loosing proxy prefix in URL
 - fixed some unicode problems with waitress
+- fixed issue with escaping < and > in changeset commits
 
 1.3.3 (**2012-03-02**)
 ----------------------

rhodecode/lib/helpers.py

 
 
 def urlify_changesets(text_, repository):
+    """
+    Extract revision ids from changeset and make link from them
+    
+    :param text_:
+    :param repository:
+    """
     import re
     URL_PAT = re.compile(r'([0-9a-fA-F]{12,})')
 
     """
     import re
     import traceback
-
-    # urlify changesets
-    text_ = urlify_changesets(text_, repository)
-
+    
+    def escaper(string):
+        return string.replace('<', '&lt;').replace('>', '&gt;')
+    
     def linkify_others(t, l):
         urls = re.compile(r'(\<a.*?\<\/a\>)',)
         links = []
                 links.append(e)
 
         return ''.join(links)
+    
+    
+    # urlify changesets - extrac revisions and make link out of them
+    text_ = urlify_changesets(escaper(text_), repository)
+
     try:
         conf = config['app_conf']