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 16, 2024
1 parent aa6b6f0 commit c6316c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@wordpress/components": "file:../components",
"@wordpress/data": "file:../data",
"@wordpress/element": "file:../element",
"@wordpress/html-entities": "file:../html-entities",
"@wordpress/i18n": "file:../i18n",
"@wordpress/icons": "file:../icons",
"@wordpress/keyboard-shortcuts": "file:../keyboard-shortcuts",
Expand Down
3 changes: 2 additions & 1 deletion packages/commands/src/components/command-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
useShortcut,
} from '@wordpress/keyboard-shortcuts';
import { Icon, search as inputIcon } from '@wordpress/icons';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
Expand Down Expand Up @@ -62,7 +63,7 @@ function CommandMenuLoader( { name, search, hook, setLoader, close } ) {
{ command.icon && <Icon icon={ command.icon } /> }
<span>
<TextHighlight
text={ command.label }
text={ decodeEntities( command.label ) }
highlight={ search }
/>
</span>
Expand Down

0 comments on commit c6316c1

Please sign in to comment.