From 69e7fd1b42412bc9fd7d6a19585af4504a45c9c2 Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Fri, 13 Jan 2023 11:14:40 -0500 Subject: [PATCH] Analytics: Decode HTML entities in CategoryBreadcrumbs (#36321) * Decode HTML entities in CategoryBreadcrumbs * Changelog --- .../client/analytics/report/categories/breadcrumbs.js | 7 +++++-- .../fix-analytics-category-breadcrumbs-html-entities | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js index 07865d6a017..6673112322e 100644 --- a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js +++ b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js @@ -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 ? (
- { this.getCategoryAncestors( category, categories ) } + { decodeEntities( + this.getCategoryAncestors( category, categories ) + ) } - { category.name } + { decodeEntities( category.name ) }
) : ( diff --git a/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities b/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities new file mode 100644 index 00000000000..5f087d9d1e0 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Decode HTML entities in CategoryBreadcrumbs.