mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-01-12 22:44:57 +08: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:
committed by
Robert Lord
parent
23eb3f433e
commit
5da237e7fe
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user