From 5ac48753ffe7d93d15ad7f72c22af641643ec889 Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Tue, 19 Nov 2024 11:44:35 -0500 Subject: [PATCH] Decode entities in social previews --- .../src/components/social-previews/modal.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/js-packages/publicize-components/src/components/social-previews/modal.js b/projects/js-packages/publicize-components/src/components/social-previews/modal.js index 43a4ea7168e26..a601f93846bf5 100644 --- a/projects/js-packages/publicize-components/src/components/social-previews/modal.js +++ b/projects/js-packages/publicize-components/src/components/social-previews/modal.js @@ -5,6 +5,7 @@ */ import { Button, Modal, TabPanel } from '@wordpress/components'; +import { decodeEntities } from '@wordpress/html-entities'; import { __ } from '@wordpress/i18n'; import { close } from '@wordpress/icons'; import { useAvailableSerivces } from './use-available-services'; @@ -15,6 +16,9 @@ const SocialPreviewsModal = function SocialPreviewsModal( { onClose, initialTabN const availableServices = useAvailableSerivces(); const { image, media, title, description, url, excerpt } = usePostData(); + const decodedTitle = decodeEntities( title ); + const decodedDescription = decodeEntities( description ); + return (