This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Fix: encode and decode term slug to support non-ASCII terms #7906
Merged
dinhtungdu
merged 2 commits into
trunk
from
fix/6993-attribute-filter-with-non-ascii-terms
Dec 12, 2022
Merged
Fix: encode and decode term slug to support non-ASCII terms #7906
dinhtungdu
merged 2 commits into
trunk
from
fix/6993-attribute-filter-with-non-ascii-terms
Dec 12, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The release ZIP for this PR is accessible via:
|
Script Dependencies ReportThe
This comment was automatically generated by the |
dinhtungdu
changed the title
properly encode and decode non-ascii term slugs
Fix: encode and decode term slug to support non-ASCII terms
Dec 9, 2022
TypeScript Errors ReportFiles with errors: 429 🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +127 B (0%) Total Size: 975 kB
ℹ️ View Unchanged
|
dinhtungdu
added
status: needs review
type: bug
The issue/PR concerns a confirmed bug.
block: filter by attribute
Issues related to the Filter by Attribute block.
labels
Dec 9, 2022
rubikuserbot
requested review from
a team and
gigitux
and removed request for
a team
December 9, 2022 05:05
gigitux
approved these changes
Dec 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! LGTM 🚢
dinhtungdu
deleted the
fix/6993-attribute-filter-with-non-ascii-terms
branch
December 12, 2022 10:46
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: filter by attribute
Issues related to the Filter by Attribute block.
type: bug
The issue/PR concerns a confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6993
This PR adds support for non-ASCII terms to the Attribute Filter block:
sanitize_title
.formatParams
which usesencodeURIComponent
to encode params.Hence, term slugs in the filter URL are encoded two times. This is fine for ASCII terms, but not for non-ASCII ones. This PR fixes the issue by:
Other Checks
Screenshots
Testing
Automated Tests
User Facing Testing
大きさ
.大
大きさ
attribute.大きさ
, see it the block works and the products is filtered as expected.WooCommerce Visibility
Performance Impact
Changelog