mirror of
https://github.com/danbulant/api_docs
synced 2026-06-20 06:41:40 +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);
|
highlight.call(this);
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
unhighlight();
|
unhighlight();
|
||||||
|
|
@ -69,19 +70,4 @@
|
||||||
content.unhighlight(highlightOpts);
|
content.unhighlight(highlightOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
var __entityMap = {
|
|
||||||
"&": "&",
|
|
||||||
"<": "<",
|
|
||||||
">": ">",
|
|
||||||
'"': '"',
|
|
||||||
"'": ''',
|
|
||||||
"/": '/'
|
|
||||||
};
|
|
||||||
|
|
||||||
String.prototype.escapeHTML = function() {
|
|
||||||
return String(this).replace(/[&<>"'\/]/g, function (s) {
|
|
||||||
return __entityMap[s];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
})(window);
|
})(window);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue