-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Parts: Limit slug to Latin chars #38861
Conversation
@kevin940726, I plan to extract this method into a utility function in a separate PR. However, I'm trying to keep fixes simple to backport in a minor release for now. |
Size Change: +30 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
// If we have `area` set from block attributes, means an exposed | ||
// block variation was inserted. So add this prop to the template | ||
// part entity on creation. Afterwards remove `area` value from | ||
// block attributes. | ||
const record = { | ||
title, | ||
slug: kebabCase( title ), | ||
slug: cleanSlug, |
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.
Since, #39033 landed, maybe try rebasing and using cleanSlug
from the url package?
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.
I also need to update REST API schema, but first want to make sure only Latin chars limitation isn't intentional.
95d94ea
to
8c19f67
Compare
I tried updating the REST API schema to use pattern that supports non-Latin chars; it didn't work that well 😅 Let's ship this bandaid patch in 6.0 and try to bring non-Latin chars support to the template endpoint in the next major release. |
Hi, @kevin940726 Should we merge this one as well? |
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.
LGTM 👍 Thanks!
Description
Follow-up of #38695 based on this comment #38160 (comment)
Testing Instructions
私のテンプレートパーツのテスト
orქართული ნაწილი
.Types of changes
Bugfix
Checklist:
*.native.js
files for terms that need renaming or removal).