Skip to content

Commit f9a8634

Browse files
author
Tomas Kirda
committed
Rev for 1.2.22 release
1 parent 174c941 commit f9a8634

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devbridge-autocomplete",
3-
"version": "1.2.21",
3+
"version": "1.2.22",
44
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
55
"authors": [
66
"Tomas Kirda"

devbridge-autocomplete.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ajax",
77
"autocomplete"
88
],
9-
"version": "1.2.21",
9+
"version": "1.2.22",
1010
"author": {
1111
"name": "Tomas Kirda",
1212
"url": "https://github.com/tkirda"

dist/jquery.autocomplete.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Ajax Autocomplete for jQuery, version 1.2.21
2+
* Ajax Autocomplete for jQuery, version 1.2.22
33
* (c) 2015 Tomas Kirda
44
*
55
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
@@ -127,15 +127,15 @@
127127
$.Autocomplete = Autocomplete;
128128

129129
Autocomplete.formatResult = function (suggestion, currentValue) {
130-
var htmlSafeString = suggestion.value
130+
var pattern = '(' + utils.escapeRegExChars(currentValue) + ')';
131+
132+
return suggestion.value
133+
.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>')
131134
.replace(/&/g, '&amp;')
132135
.replace(/</g, '&lt;')
133136
.replace(/>/g, '&gt;')
134-
.replace(/"/g, '&quot;');
135-
136-
var pattern = '(' + utils.escapeRegExChars(currentValue) + ')';
137-
138-
return htmlSafeString.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
137+
.replace(/"/g, '&quot;')
138+
.replace(/&lt;(\/?strong)&gt;/g, '<$1>');
139139
};
140140

141141
Autocomplete.prototype = {

dist/jquery.autocomplete.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devbridge-autocomplete",
3-
"version": "1.2.21",
3+
"version": "1.2.22",
44
"description": "Autocomplete provides suggestions while you type into the text field.",
55
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
66
"author": "Tomas Kirda (https://twitter.com/tkirda)",

0 commit comments

Comments
 (0)