Changeset - 122f15a8f6ec
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2012-03-07 04:26:33
marcin@python-works.com
fixed issue with escaping < and > in changeset commits
2 files changed with 14 insertions and 2 deletions:
0 comments (0 inline, 0 general)
docs/changelog.rst
Show inline comments
 
@@ -26,6 +26,7 @@ fixes
 
- 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
Show inline comments
 
@@ -802,6 +802,12 @@ def urlify_text(text_):
 

	
 

	
 
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,})')
 

	
 
@@ -840,8 +846,8 @@ def urlify_commit(text_, repository=None
 
    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\>)',)
 
@@ -853,6 +859,11 @@ def urlify_commit(text_, repository=None
 
                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']
 

	
0 comments (0 inline, 0 general)