Skip to content

Commit

Permalink
Link autocompleter: decode post title HTML entities (WordPress#65589)
Browse files Browse the repository at this point in the history
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: MadtownLems <madtownlems@git.wordpress.org>
  • Loading branch information
4 people committed Sep 24, 2024
1 parent 096c883 commit 69d77a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-editor/src/autocompleters/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import apiFetch from '@wordpress/api-fetch';
import { addQueryArgs } from '@wordpress/url';
import { Icon, page, post } from '@wordpress/icons';
import { decodeEntities } from '@wordpress/html-entities';

const SHOWN_SUGGESTIONS = 10;

Expand Down Expand Up @@ -46,7 +47,7 @@ function createLinkCompleter() {
key="icon"
icon={ item.subtype === 'page' ? page : post }
/>
{ item.title }
{ decodeEntities( item.title ) }
</>
);
},
Expand Down

0 comments on commit 69d77a1

Please sign in to comment.