[wp-trac] [WordPress Trac] #63027: Block type path normalization is inconsistent (e.g. for Windows)

WordPress Trac noreply at wordpress.org
Wed Feb 26 19:33:10 UTC 2025


#63027: Block type path normalization is inconsistent (e.g. for Windows)
--------------------------+------------------------------------------
 Reporter:  flixos90      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  6.9
Component:  Editor        |    Version:  5.5
 Severity:  normal        |   Keywords:  needs-patch needs-unit-tests
  Focuses:                |
--------------------------+------------------------------------------
 The various block type registration functions heavily rely on
 `wp_normalize_path()` to ensure consistent path strings (e.g. replace `\\`
 with `/`) on OSs like Windows. However, in some places such function calls
 are missing, or code is performing string operations to trim `/` slashes
 on a path before it's been sanitized with `wp_normalize_path()`.

 This was initially raised by @gziolo in https://github.com/WordPress
 /wordpress-develop/pull/8129#pullrequestreview-2642709880.

 We should review those code paths and fix those problems (e.g.
 `register_block_type_from_metadata()` and related functions,
 `WP_Block_Metadata_Registry` and related functions).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63027>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list