Mercurial > kallithea
changeset 2389:324b838250c9 beta
UI fixes for searching
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 05 Jun 2012 00:48:20 +0200 |
parents | a0ef98f2520b |
children | b0d09c20f608 |
files | rhodecode/lib/indexers/__init__.py rhodecode/templates/search/search.html |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/indexers/__init__.py Tue Jun 05 00:27:59 2012 +0200 +++ b/rhodecode/lib/indexers/__init__.py Tue Jun 05 00:48:20 2012 +0200 @@ -40,7 +40,7 @@ from whoosh.formats import Characters from whoosh.highlight import highlight, HtmlFormatter, ContextFragmenter -from webhelpers.html.builder import escape +from webhelpers.html.builder import escape, literal from sqlalchemy import engine_from_config from rhodecode.model import init_model @@ -231,7 +231,7 @@ if self.search_type != 'content': return '' hl = highlight( - text=escape(content), + text=content, terms=self.highlight_items, analyzer=ANALYZER, fragmenter=FRAGMENTER,
--- a/rhodecode/templates/search/search.html Tue Jun 05 00:27:59 2012 +0200 +++ b/rhodecode/templates/search/search.html Tue Jun 05 00:48:20 2012 +0200 @@ -65,7 +65,7 @@ </div> </div> ${h.end_form()} - + <div class="search"> %if c.cur_search == 'content': <%include file='search_content.html'/> %elif c.cur_search == 'path': @@ -75,6 +75,7 @@ %elif c.cur_search == 'repository': <%include file='search_repository.html'/> %endif + </div> </div> </%def>