diff --git a/packages/editor/src/components/post-excerpt/index.js b/packages/editor/src/components/post-excerpt/index.js index cdfb27c4631cc8..2555922f4e45ae 100644 --- a/packages/editor/src/components/post-excerpt/index.js +++ b/packages/editor/src/components/post-excerpt/index.js @@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n'; import { ExternalLink, TextareaControl } from '@wordpress/components'; import { useDispatch, useSelect } from '@wordpress/data'; import { useState } from '@wordpress/element'; +import { decodeEntities } from '@wordpress/html-entities'; /** * Internal dependencies @@ -52,7 +53,9 @@ export default function PostExcerpt( { [] ); const { editPost } = useDispatch( editorStore ); - const [ localExcerpt, setLocalExcerpt ] = useState( excerpt ); + const [ localExcerpt, setLocalExcerpt ] = useState( + decodeEntities( excerpt ) + ); const updatePost = ( value ) => { editPost( { [ usedAttribute ]: value } ); }; diff --git a/packages/editor/src/components/post-excerpt/panel.js b/packages/editor/src/components/post-excerpt/panel.js index 55952278d22476..f11317a78d4254 100644 --- a/packages/editor/src/components/post-excerpt/panel.js +++ b/packages/editor/src/components/post-excerpt/panel.js @@ -13,6 +13,7 @@ import { useDispatch, useSelect } from '@wordpress/data'; import { useMemo, useState } from '@wordpress/element'; import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor'; import { store as coreStore } from '@wordpress/core-data'; +import { decodeEntities } from '@wordpress/html-entities'; /** * Internal dependencies @@ -173,7 +174,7 @@ function PrivateExcerpt() { } const excerptText = !! excerpt && ( - { excerpt } + { decodeEntities( excerpt ) } ); if ( ! allowEditing ) {