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:
Rouven Weßling
2015-03-29 22:39:41 +02:00
committed by Robert Lord
parent 23eb3f433e
commit 5da237e7fe

View File

@@ -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 {