changeset 5160:0e03fb3384df stable

repos: fix superfluous escaping of urlified URLs in repo descriptions The h.escape usage introduced in a8f2986afc18 was too aggressive and magic.
author Mads Kiilerich <madski@unity3d.com>
date Sat, 06 Jun 2015 17:24:22 +0200
parents c44885d0e546
children 83e0a4ce1c07
files kallithea/model/repo.py kallithea/templates/summary/summary.html
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/repo.py	Fri May 22 23:56:50 2015 +0200
+++ b/kallithea/model/repo.py	Sat Jun 06 17:24:22 2015 +0200
@@ -210,9 +210,9 @@
 
         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)
--- a/kallithea/templates/summary/summary.html	Fri May 22 23:56:50 2015 +0200
+++ b/kallithea/templates/summary/summary.html	Sat Jun 06 17:24:22 2015 +0200
@@ -85,9 +85,9 @@
                   <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>