From 0c5c2fe06ab9bf1479ff7f9875c2e2655f7a3dc9 Mon Sep 17 00:00:00 2001 From: 719media <719media@users.noreply.github.com> Date: Thu, 13 Apr 2017 14:11:15 -0700 Subject: [PATCH] use jquery escaping for class names/category names that otherwise cause problems use jquery escaping for class names/category names that otherwise cause problems --- src/jquery.autocomplete.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 91afcab5..65b69a90 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -151,7 +151,7 @@ }; function _formatGroup(suggestion, category) { - return '
' + category + '
'; + return $('
').append(category).prop('outerHTML'); }; Autocomplete.prototype = { @@ -665,7 +665,7 @@ html += formatGroup(suggestion, value, i); } - html += '
' + formatResult(suggestion, value, i) + '
'; + html += $('
').attr('data-index', i).addClass(className).append(formatResult(suggestion, value, i)).prop('outerHTML'); }); this.adjustContainerWidth();