Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Previews: Decode entities in post titles, excerpts, and descriptions #40256

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Decode entities in post titles and descriptions for social previews.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -36,9 +37,9 @@ const SocialPreviewsModal = function SocialPreviewsModal( { onClose, initialTabN
<div>
<tab.preview
// pass only the props that are common to all previews
excerpt={ excerpt }
title={ title }
description={ description }
excerpt={ decodeEntities( excerpt ) }
title={ decodeEntities( title ) }
description={ decodeEntities( description ) }
url={ url }
image={ image }
media={ media }
Expand Down
Loading