mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 11:39:37 +08:00
fix sanitization of autocomplete against XSS
This commit is contained in:
parent
5ad47d3866
commit
4c3fcc3ea6
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ function highlightSearchResults(searchResults, highlightedTokens) {
|
||||||
for (const result of searchResults) {
|
for (const result of searchResults) {
|
||||||
const note = becca.notes[result.noteId];
|
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))) {
|
if (highlightedTokens.find(token => note.type.includes(token))) {
|
||||||
result.highlightedNotePathTitle += ` "type: ${note.type}'`;
|
result.highlightedNotePathTitle += ` "type: ${note.type}'`;
|
||||||
|
|
Loading…
Reference in a new issue