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
 
@@ -210,9 +210,9 @@ class RepoModel(BaseModel):
 

	
 
        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)
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -85,9 +85,9 @@ summary = lambda n:{False:'summary-short
 
                  <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>
 

	
0 comments (0 inline, 0 general)