Skip to content

Commit

Permalink
Use textContent for search results mark
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmitchell committed Jul 29, 2024
1 parent 05ff120 commit 169692b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function ready() {

var searchResults = document.getElementById('search-results');

document.getElementById('search-query').innerHTML = 'Search results for <mark>' + searchTerm + '</mark>';
document.querySelector('#search-query mark').textContent = searchTerm;

var appendString = '';

Expand Down
2 changes: 1 addition & 1 deletion docs/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Search Results
nav: false
---

<h1 id="search-query"></h1>
<h1 id="search-query">Search results for <mark></mark></h1>

<div id="search-results"></div>

Expand Down

0 comments on commit 169692b

Please sign in to comment.