[wp-trac] [WordPress Trac] #58132: Slashes used in block templates slug is a problem on Windows
WordPress Trac
noreply at wordpress.org
Fri Apr 14 14:20:59 UTC 2023
#58132: Slashes used in block templates slug is a problem on Windows
--------------------------------------------------+---------------------
Reporter: gaft | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2.1
Component: Editor | Version: 5.9
Severity: normal | Resolution:
Keywords: needs-testing-info reporter-feedback | Focuses:
--------------------------------------------------+---------------------
Changes (by davidbaumwald):
* keywords: needs-testing-info needs-testing reporter-feedback => needs-
testing-info reporter-feedback
* type: enhancement => defect (bug)
* version: 6.2 => 5.9
* component: General => Editor
Comment:
I haven't spent too much time tracing this, but I think
`wp_normalize_path` would probably be a better fix than `strpos`. I am
exactly not sure where the fix would be, but I feel like it's higher up
the chain than the current patch places it. I'm thinking perhaps the
paths should be normalized in `_get_block_templates_files`, but not 100%
sure.
This looks like it might be [52062] that introduced the
`_get_block_templates_files` code, while [52247] abstracted the base paths
into `get_block_theme_folders`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58132#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list