Skip to content

Commit

Permalink
Fix issue of HTML entities rendering in command menu
Browse files Browse the repository at this point in the history
  • Loading branch information
amitraj2203 committed Jun 19, 2024
1 parent 303b8c8 commit 1e2ac81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/element": "file:../element",
"@wordpress/html-entities": "file:../html-entities",
"@wordpress/i18n": "file:../i18n",
"@wordpress/icons": "file:../icons",
"@wordpress/private-apis": "file:../private-apis",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import { privateApis as routerPrivateApis } from '@wordpress/router';
import { addQueryArgs, getPath } from '@wordpress/url';
import { useDebounce } from '@wordpress/compose';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
Expand Down Expand Up @@ -93,7 +94,7 @@ const getNavigationCommandLoaderPerPostType = ( postType ) =>
name: postType + '-' + record.id,
searchLabel: record.title?.rendered + ' ' + record.id,
label: record.title?.rendered
? record.title?.rendered
? decodeEntities( record.title?.rendered )
: __( '(no title)' ),
icon: icons[ postType ],
};
Expand Down

0 comments on commit 1e2ac81

Please sign in to comment.