From c0dd741a79af6334275dac0385d99c5c54fb52dd Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Sat, 12 Jan 2013 17:29:48 +0100 Subject: [PATCH] Fixed testing mistake --- select2.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/select2.js b/select2.js index fee95048..55d6d334 100644 --- a/select2.js +++ b/select2.js @@ -2442,16 +2442,15 @@ the specific language governing permissions and limitations under the Apache Lic escapeMarkup: function (markup) { var replace_map = { '\\': '\', - '&': '&#amp;', - '<': '&#lt;', - '>': '&#rt;', - '"': '&#quot;', - "'": ''', - "/": '/' + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + "/": '/' }; - //'--': '--' - return String(html).replace(/[&<>"'/\\]/g, function (match) { + return String(markup).replace(/[&<>"'/\\]/g, function (match) { return replace_map[match[0]]; });