File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from html2text import html2text
66from frappe .utils import sanitize_html
77from frappe .utils .global_search import search
8+ from six import text_type
89
910def get_context (context ):
1011 context .no_cache = 1
1112 if frappe .form_dict .q :
1213 query = str (utils .escape (sanitize_html (frappe .form_dict .q )))
1314 context .title = _ ('Help Results for' )
1415 context .query = query
15-
16+
1617 context .route = '/search_help'
1718 d = frappe ._dict ()
1819 d .results_sections = get_help_results_sections (query )
@@ -73,7 +74,7 @@ def prepare_api_results(api, topics_data):
7374 for topic in topics_data :
7475 route = api .base_url + '/' + (api .post_route + '/' if api .post_route else "" )
7576 for key in api .post_route_key_list .split (',' ):
76- route += unicode (topic [key ])
77+ route += text_type (topic [key ])
7778
7879 results .append (frappe ._dict ({
7980 'title' : topic [api .post_title_key ],
You can’t perform that action at this time.
0 commit comments