Commit 5da237e7 authored by Rouven Weßling's avatar Rouven Weßling Committed by Robert Lord

Don't use a selector to get the heading text for search results.

Prevents bugs with special CSS characters.

Closes #201.
parent 23eb3f43
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
if (results.length) { if (results.length) {
searchResults.empty(); searchResults.empty();
$.each(results, function (index, result) { $.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); highlight.call(this);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment