From 2746bda978aea81f84570f393ac7bfcb61a81d47 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 29 May 2023 19:08:25 +0300 Subject: [PATCH] Properly decode new template title in snackbar (#51057) --- .../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 0a3037603226fc..a0ea141bda52e3 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',