mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 12:19:08 +00:00
changed to use jQuery text method
This commit is contained in:
parent
b40b3b47ed
commit
b1256f4800
1 changed files with 2 additions and 16 deletions
|
|
@ -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 = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/'
|
||||
};
|
||||
|
||||
String.prototype.escapeHTML = function() {
|
||||
return String(this).replace(/[&<>"'\/]/g, function (s) {
|
||||
return __entityMap[s];
|
||||
});
|
||||
}
|
||||
|
||||
})(window);
|
||||
|
|
|
|||
Loading…
Reference in a new issue