Changeset - 0e03fb3384df
[Not reviewed]
stable
0 2 0
Mads Kiilerich - 10 years ago 2015-06-06 17:24:22
madski@unity3d.com
repos: fix superfluous escaping of urlified URLs in repo descriptions

The h.escape usage introduced in a8f2986afc18 was too aggressive and magic.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/model/repo.py
Show inline comments
 
@@ -207,15 +207,15 @@ class RepoModel(BaseModel):
 
            return _render('revision', repo_name, cs_cache.get('revision'),
 
                           cs_cache.get('raw_id'), cs_cache.get('author'),
 
                           cs_cache.get('message'))
 

	
 
        def desc(desc):
 
            if c.visual.stylify_metatags:
 
                return h.urlify_text(h.desc_stylize(h.escape(h.truncate(desc, 60))))
 
                return h.urlify_text(h.desc_stylize(h.html_escape(h.truncate(desc, 60))))
 
            else:
 
                return h.urlify_text(h.escape(h.truncate(desc, 60)))
 
                return h.urlify_text(h.html_escape(h.truncate(desc, 60)))
 

	
 
        def state(repo_state):
 
            return _render("repo_state", repo_state)
 

	
 
        def repo_actions(repo_name):
 
            return _render('repo_actions', repo_name, super_user_actions)
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -82,15 +82,15 @@ summary = lambda n:{False:'summary-short
 

	
 
            <div class="field">
 
              <div class="label-summary">
 
                  <label>${_('Description')}:</label>
 
              </div>
 
                 %if c.visual.stylify_metatags:
 
                   <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(h.escape(c.db_repo.description)))}</div>
 
                   <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(h.html_escape(c.db_repo.description)))}</div>
 
                 %else:
 
                   <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.escape(c.db_repo.description))}</div>
 
                   <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.html_escape(c.db_repo.description))}</div>
 
                 %endif
 
            </div>
 

	
 
            <div class="field">
 
              <div class="label-summary">
 
                  <label>${_('Trending files')}:</label>
0 comments (0 inline, 0 general)