Skip to content

Commit

Permalink
[HTML search] Safety guard: restore escapedWord conditional check b…
Browse files Browse the repository at this point in the history
…efore partial term match result collection.
  • Loading branch information
jayaddison committed Jul 19, 2024
1 parent 94daefd commit d38500b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sphinx/themes/basic/static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ const Search = {
}

candidateTerms.forEach((term) => {
arr.push({ files: terms[term], score: Scorer.partialTerm });
if (term.match(escapedWord))
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
}
if (!titleTerms.hasOwnProperty(word)) {
Expand Down

0 comments on commit d38500b

Please sign in to comment.