From a5be79ad0671c080f7d38a0a8ee220f3bb0f6240 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 30 Jan 2023 17:28:59 +0200 Subject: [PATCH] Lodash: Refactor Tag Cloud block away from _.unescape() --- packages/block-library/src/post-terms/edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/post-terms/edit.js b/packages/block-library/src/post-terms/edit.js index 392b750c2e6f00..d46c738e79ec4e 100644 --- a/packages/block-library/src/post-terms/edit.js +++ b/packages/block-library/src/post-terms/edit.js @@ -2,7 +2,6 @@ * External dependencies */ import classnames from 'classnames'; -import { unescape } from 'lodash'; /** * WordPress dependencies @@ -18,6 +17,7 @@ import { import { createBlock, getDefaultBlockName } from '@wordpress/blocks'; import { Spinner, TextControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; +import { decodeEntities } from '@wordpress/html-entities'; import { __ } from '@wordpress/i18n'; import { store as coreStore } from '@wordpress/core-data'; @@ -120,7 +120,7 @@ export default function PostTermsEdit( { href={ postTerm.link } onClick={ ( event ) => event.preventDefault() } > - { unescape( postTerm.name ) } + { decodeEntities( postTerm.name ) } ) ) .reduce( ( prev, curr ) => (