diff --git a/rhodecode/apps/home/views.py b/rhodecode/apps/home/views.py --- a/rhodecode/apps/home/views.py +++ b/rhodecode/apps/home/views.py @@ -32,7 +32,7 @@ from rhodecode.lib.auth import ( HasRepoGroupPermissionAny, AuthUser) from rhodecode.lib.codeblocks import filenode_as_lines_tokens from rhodecode.lib.index import searcher_from_config -from rhodecode.lib.utils2 import safe_unicode, str2bool, safe_int +from rhodecode.lib.utils2 import safe_unicode, str2bool, safe_int, safe_str from rhodecode.lib.vcs.nodes import FileNode from rhodecode.model.db import ( func, true, or_, case, cast, in_filter_generator, String, Session, @@ -331,7 +331,8 @@ class HomeView(BaseAppView, DataGridAppV { 'id': obj.pull_request_id, 'value': org_query, - 'value_display': 'pull request: `!{} - {}`'.format(obj.pull_request_id, obj.title[:50]), + 'value_display': 'pull request: `!{} - {}`'.format( + obj.pull_request_id, safe_str(obj.title[:50])), 'type': 'pull_request', 'url': h.route_path('pull_requests_global', pull_request_id=obj.pull_request_id) } diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -785,15 +785,15 @@ - Prefix query to allow special search: - user:admin, to search for usernames, always global + user:admin, to search for usernames, always global - user_group:devops, to search for user groups, always global + user_group:devops, to search for user groups, always global - pr:303, to search for pull request number, title, or description, always global + pr:303, to search for pull request number, title, or description, always global - commit:efced4, to search for commits, scoped to repositories or groups + commit:efced4, to search for commits, scoped to repositories or groups - file:models.py, to search for file paths, scoped to repositories or groups + file:models.py, to search for file paths, scoped to repositories or groups % if c.template_context['search_context']['repo_id']: For advanced full text search visit: repository search