changed to use jQuery text method

This commit is contained in:
Kevin Adams 2014-10-09 14:59:06 -07:00
parent b40b3b47ed
commit b1256f4800

View file

@ -53,7 +53,8 @@
});
highlight.call(this);
} else {
searchResults.html('<li>No Results Found for "' + this.value.escapeHTML() + '"</li>');
searchResults.html('<li></li>');
$('.search-results li').text('No Results Found for "' + this.value + '"');
}
} else {
unhighlight();
@ -69,19 +70,4 @@
content.unhighlight(highlightOpts);
}
var __entityMap = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;'
};
String.prototype.escapeHTML = function() {
return String(this).replace(/[&<>"'\/]/g, function (s) {
return __entityMap[s];
});
}
})(window);