From 5da237e7fe9d7bfa654d5f81aabd7a79c997d8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Sun, 29 Mar 2015 22:39:41 +0200 Subject: [PATCH] Don't use a selector to get the heading text for search results. Prevents bugs with special CSS characters. Closes #201. --- source/javascripts/app/search.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/javascripts/app/search.js b/source/javascripts/app/search.js index cf2eaf8..3c22f71 100644 --- a/source/javascripts/app/search.js +++ b/source/javascripts/app/search.js @@ -50,7 +50,8 @@ if (results.length) { searchResults.empty(); $.each(results, function (index, result) { - searchResults.append("
  • " + $('#'+result.ref).text() + "
  • "); + var elem = document.getElementById(result.ref); + searchResults.append("
  • " + $(elem).text() + "
  • "); }); highlight.call(this); } else {