Skip to content

Commit

Permalink
Properly decode new template title in snackbar (#51057)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored May 29, 2023
1 parent c885bb1 commit 2746bda
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
__experimentalText as Text,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { decodeEntities } from '@wordpress/html-entities';
import { useState } from '@wordpress/element';
import { useDispatch } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
Expand Down Expand Up @@ -140,7 +141,7 @@ export default function NewTemplate( {
sprintf(
// translators: %s: Title of the created template e.g: "Category".
__( '"%s" successfully created.' ),
newTemplate.title?.rendered || title
decodeEntities( newTemplate.title?.rendered || title )
),
{
type: 'snackbar',
Expand Down

1 comment on commit 2746bda

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 2746bda.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5113588555
📝 Reported issues:

Please sign in to comment.