Skip to content

Commit

Permalink
Backport "Prevent HTML/XSS Injection in Scala Search" to LTS (#21005)
Browse files Browse the repository at this point in the history
Backports #19980 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Jul 4, 2024
2 parents e6cf32c + 1f761bb commit 29c9888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/_layouts/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ <h2 class="d-none d-md-block">Member Results</h2>

// Set search term and title:
var searchTerm = decodeURIComponent(parameters["searchTerm"]);
document.getElementById("searching-for").innerHTML = 'Search results for "' + searchTerm + '"';
document.getElementById("searching-for").innerText = 'Search results for "' + searchTerm + '"';
document.title = searchTerm + ' - Search results';

if (!window.Worker) {
document.getElementById("searching-for").innerHTML =
document.getElementById("searching-for").innerText =
"Couldn't search for \"" + searchTerm + "\", " +
"web workers not supported. Please update your browser.";
}
Expand Down

0 comments on commit 29c9888

Please sign in to comment.