mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix client auto-complete search highlighting
This commit is contained in:
parent
27d1c13e79
commit
691469979c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -450,10 +450,10 @@ if (window.ko) {
|
|||||||
function comboboxHighlighter(item) {
|
function comboboxHighlighter(item) {
|
||||||
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
|
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
|
||||||
var result = item.replace(new RegExp('<br/>', 'g'), "\n");
|
var result = item.replace(new RegExp('<br/>', 'g'), "\n");
|
||||||
|
result = stripHtmlTags(result);
|
||||||
result = result.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
result = result.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
||||||
return match ? '<strong>' + match + '</strong>' : query;
|
return match ? '<strong>' + match + '</strong>' : query;
|
||||||
});
|
});
|
||||||
result = stripHtmlTags(result);
|
|
||||||
return result.replace(new RegExp("\n", 'g'), '<br/>');
|
return result.replace(new RegExp("\n", 'g'), '<br/>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user