[wp-trac] [WordPress Trac] #57329: Cannot save new custom template when name contains none-Latin characters
WordPress Trac
noreply at wordpress.org
Mon Jan 9 15:39:09 UTC 2023
#57329: Cannot save new custom template when name contains none-Latin characters
-------------------------------------+-------------------------------------
Reporter: mburridge | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 6.1.1
Severity: normal | Resolution:
Keywords: has-patch has-unit- | Focuses: javascript,
tests | administration, rest-api
-------------------------------------+-------------------------------------
Comment (by antonyagrios):
Minor explanation of the introduced regex:
Before it was `\w`: This actually matches the following: `a-z`, `A-Z`,
`0-9` and `_`
Changing this to `\pL0-9_`, we match the same as before, plus all the
unicode characters for all the languages mentioned
[here](https://www.php.net/regexp.reference.unicode).
I also kept the `0-9_` to match what we had before when we used `\w`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57329#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list