Merge pull request #15094 from frappe/search-injection-fix
prevent jinja exec in search title
This commit is contained in:
commit
733433c91e
@ -10,7 +10,9 @@ def get_context(context):
|
|||||||
context.no_cache = 1
|
context.no_cache = 1
|
||||||
if frappe.form_dict.q:
|
if frappe.form_dict.q:
|
||||||
query = str(utils.escape(sanitize_html(frappe.form_dict.q)))
|
query = str(utils.escape(sanitize_html(frappe.form_dict.q)))
|
||||||
context.title = _('Help Results for "{0}"').format(query)
|
context.title = _('Help Results for')
|
||||||
|
context.query = query
|
||||||
|
|
||||||
context.route = '/search_help'
|
context.route = '/search_help'
|
||||||
d = frappe._dict()
|
d = frappe._dict()
|
||||||
d.results_sections = get_help_results_sections(query)
|
d.results_sections = get_help_results_sections(query)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user