mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
Don't use a selector to get the heading text for search results.
Prevents bugs with special CSS characters. Closes #201.
This commit is contained in:
parent
23eb3f433e
commit
5da237e7fe
1 changed files with 2 additions and 1 deletions
|
|
@ -50,7 +50,8 @@
|
|||
if (results.length) {
|
||||
searchResults.empty();
|
||||
$.each(results, function (index, result) {
|
||||
searchResults.append("<li><a href='#" + result.ref + "'>" + $('#'+result.ref).text() + "</a></li>");
|
||||
var elem = document.getElementById(result.ref);
|
||||
searchResults.append("<li><a href='#" + result.ref + "'>" + $(elem).text() + "</a></li>");
|
||||
});
|
||||
highlight.call(this);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue