You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/04/25 00:30:56 UTC

[31/50] git commit: [#2835] ticket:308 Removed unnecessary re-escaping of matches

[#2835] ticket:308 Removed unnecessary re-escaping of matches


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1bdaa1ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1bdaa1ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1bdaa1ec

Branch: refs/heads/cj/5655
Commit: 1bdaa1ecfa4962f02168d77c4632c1732085d46a
Parents: ac9e35d
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Apr 2 11:56:19 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 24 16:34:42 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/search.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1bdaa1ec/Allura/allura/lib/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index 97a67da..29c28b7 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -163,11 +163,11 @@ def search_app(q='', fq=None, app=True, **kw):
                 title = h.get_first(m, 'title')
                 text = h.get_first(m, 'text')
                 if title:
-                    title = (jinja2.escape(title)
+                    title = (jinja2.Markup(title)
                                    .replace('#ALLURA-HIGHLIGHT-START#', jinja2.Markup('<strong>'))
                                    .replace('#ALLURA-HIGHLIGHT-END#', jinja2.Markup('</strong>')))
                 if text:
-                    text = (jinja2.escape(text)
+                    text = (jinja2.Markup(text)
                                   .replace('#ALLURA-HIGHLIGHT-START#', jinja2.Markup('<strong>'))
                                   .replace('#ALLURA-HIGHLIGHT-END#', jinja2.Markup('</strong>')))
                 doc['title_match'] = title