1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Fix title rendering in GotoAnything search results (#11356)

This commit is contained in:
Henry Heino
2024-11-09 04:54:29 -08:00
committed by GitHub
parent a08ebb9ce5
commit 360ece6f88

View File

@@ -23,6 +23,7 @@ import Resource from '@joplin/lib/models/Resource';
import { NoteEntity, ResourceEntity } from '@joplin/lib/services/database/types';
import Dialog from '../gui/Dialog';
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
import { htmlentities } from '@joplin/utils/html';
const logger = Logger.create('GotoAnything');
@@ -555,7 +556,7 @@ class DialogComponent extends React.PureComponent<Props, State> {
};
const titleHtml = item.fragments
? `<span style="font-weight: bold; color: ${theme.color};">${item.title}</span>`
? `<span style="font-weight: bold; color: ${theme.color};">${htmlentities(item.title)}</span>`
: wrapKeywordMatches(item.title);
const fragmentsHtml = !item.fragments ? null : wrapKeywordMatches(item.fragments);