You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Desktop: Fix title rendering in GotoAnything search results (#11356)
This commit is contained in:
@@ -23,6 +23,7 @@ import Resource from '@joplin/lib/models/Resource';
|
|||||||
import { NoteEntity, ResourceEntity } from '@joplin/lib/services/database/types';
|
import { NoteEntity, ResourceEntity } from '@joplin/lib/services/database/types';
|
||||||
import Dialog from '../gui/Dialog';
|
import Dialog from '../gui/Dialog';
|
||||||
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
|
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
|
||||||
|
import { htmlentities } from '@joplin/utils/html';
|
||||||
|
|
||||||
const logger = Logger.create('GotoAnything');
|
const logger = Logger.create('GotoAnything');
|
||||||
|
|
||||||
@@ -555,7 +556,7 @@ class DialogComponent extends React.PureComponent<Props, State> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const titleHtml = item.fragments
|
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);
|
: wrapKeywordMatches(item.title);
|
||||||
|
|
||||||
const fragmentsHtml = !item.fragments ? null : wrapKeywordMatches(item.fragments);
|
const fragmentsHtml = !item.fragments ? null : wrapKeywordMatches(item.fragments);
|
||||||
|
|||||||
Reference in New Issue
Block a user