Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix sanitization of autocomplete against XSS
  • Loading branch information
zadam committed Mar 17, 2023
1 parent 5ad47d3 commit 4c3fcc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/search/services/search.js
Expand Up @@ -307,7 +307,7 @@ function highlightSearchResults(searchResults, highlightedTokens) {
for (const result of searchResults) {
const note = becca.notes[result.noteId];

result.highlightedNotePathTitle = result.notePathTitle.replace('/[<\{\}]/g', '');
result.highlightedNotePathTitle = result.notePathTitle.replace(/[<{}]/g, '');

if (highlightedTokens.find(token => note.type.includes(token))) {
result.highlightedNotePathTitle += ` "type: ${note.type}'`;
Expand Down

0 comments on commit 4c3fcc3

Please sign in to comment.