From 4861e8a04ab0eb6d85a8e05ff9fc424d5dcac516 Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Mon, 6 Mar 2017 18:52:27 +0530 Subject: [PATCH] [minor] purge special characters in help results --- frappe/public/js/frappe/ui/toolbar/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/ui/toolbar/search.js b/frappe/public/js/frappe/ui/toolbar/search.js index c8da293e63..0e6cf206b8 100644 --- a/frappe/public/js/frappe/ui/toolbar/search.js +++ b/frappe/public/js/frappe/ui/toolbar/search.js @@ -821,11 +821,13 @@ frappe.search.HelpSearch = frappe.search.GlobalSearch.extend({ make_result_item: function(type, result) { var me = this; + var regEx = new RegExp("{index}", "ig"); + var content = result[1].replace(regEx, ''); var link_html = '
' + '{1}' + '

{2}

' + '
'; - var link = $(__(link_html, [result[2], result[0], result[1]])); + var link = $(__(link_html, [result[2], result[0], content])); return link; },