Analytics: Decode HTML entities in CategoryBreadcrumbs (#36321)

* Decode HTML entities in CategoryBreadcrumbs

* Changelog
This commit is contained in:
Matt Sherman 2023-01-13 11:14:40 -05:00 committed by GitHub
parent c3d62f113a
commit 69e7fd1b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@
import { Component } from '@wordpress/element';
import { first, last } from 'lodash';
import { Spinner } from '@wordpress/components';
import { decodeEntities } from '@wordpress/html-entities';
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
@ -49,7 +50,9 @@ export default class CategoryBreadcrumbs extends Component {
return category ? (
<div className="woocommerce-table__breadcrumbs">
{ this.getCategoryAncestors( category, categories ) }
{ decodeEntities(
this.getCategoryAncestors( category, categories )
) }
<Link
href={ getNewPath(
persistedQuery,
@ -61,7 +64,7 @@ export default class CategoryBreadcrumbs extends Component {
) }
type="wc-admin"
>
{ category.name }
{ decodeEntities( category.name ) }
</Link>
</div>
) : (

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Decode HTML entities in CategoryBreadcrumbs.