Skip to content

Commit

Permalink
Block Library: Decode entities in page list item title (#47571)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Jan 30, 2023
1 parent c4f9d99 commit ca9f857
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/block-library/src/page-list-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import classnames from 'classnames';
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
Expand Down Expand Up @@ -67,7 +68,7 @@ export default function PageListItemEdit( { context, attributes } ) {
className="wp-block-navigation-item__content wp-block-navigation-submenu__toggle"
aria-expanded="false"
>
{ label }
{ decodeEntities( label ) }
</button>
<span className="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon">
<ItemSubmenuIcon />
Expand All @@ -80,7 +81,7 @@ export default function PageListItemEdit( { context, attributes } ) {
} ) }
href={ link }
>
{ label }
{ decodeEntities( label ) }
</a>
) }
{ hasChildren && (
Expand Down

0 comments on commit ca9f857

Please sign in to comment.