From 2503990c9f57f90fedbcb6bb5acacba34fc1c023 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 29 May 2023 17:26:59 +0300 Subject: [PATCH] Properly decode new template title in snackbar --- .../edit-site/src/components/add-new-template/new-template.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/add-new-template/new-template.js b/packages/edit-site/src/components/add-new-template/new-template.js index 0a3037603226f..a0ea141bda52e 100644 --- a/packages/edit-site/src/components/add-new-template/new-template.js +++ b/packages/edit-site/src/components/add-new-template/new-template.js @@ -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'; @@ -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',