Skip to content

Conversation

@mattsherman
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR decodes HTML entities in category names in the CategoryBreadcrumbs Analytics component, which is used in the Products and Categories Analytics reports.

This addresses a customer issue (5833679-zd-woothemes), where they had category names with ampersands (&) in them that were not being properly displayed.

Before:

Screenshot 2023-01-06 at 11 45 37

Screenshot 2023-01-06 at 11 46 03

After:

Screenshot 2023-01-06 at 11 47 54

Screenshot 2023-01-06 at 11 48 12

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Create a category with an ampersand (&) in the name.
  2. Create a product and assign it to that category.
  3. Create an order that contains that product.
  4. Run the Products and Categories Analytics reports and verify that the category name appears correctly, with the ampersand HTML entity (&) decoded.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@mattsherman mattsherman added Bug The issue is a confirmed bug. Reports/Analytics Issues related to analytics section. labels Jan 6, 2023
@mattsherman mattsherman requested a review from a team January 6, 2023 16:59
@mattsherman mattsherman self-assigned this Jan 6, 2023
@mattsherman mattsherman changed the title Decode HTML entities in CategoryBreadcrumbs Analytics: Decode HTML entities in CategoryBreadcrumbs Jan 6, 2023
@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jan 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2023

Test Results Summary

Commit SHA: d8a9b66

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 50s
E2E Tests189006019515m 1s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@mattsherman mattsherman marked this pull request as ready for review January 6, 2023 17:33
Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this @mattsherman, this tested well! LGTM 🚀

@mattsherman mattsherman merged commit 69e7fd1 into trunk Jan 13, 2023
@mattsherman mattsherman deleted the fix/analytics-category-breadcrumbs-html-entities branch January 13, 2023 16:14
@github-actions github-actions bot added this to the 7.4.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug The issue is a confirmed bug. plugin: woocommerce Issues related to the WooCommerce Core plugin. Reports/Analytics Issues related to analytics section.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants