-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REST] Restore the missing double slash in the ID received by /templa…
…tes (#36881) * Fall back to a double-slashed template name if a single-slashed one is missing * Add a unit test * Use $_SERVER['REQUEST_URI'] as a fallback instead of simply replacing all slashes with a double slash. * Fallback to parsing the query string instead of doing it by default * Code style * Update docstring * Try doubling the last slash instead of parsing REQUEST_URI * Use sanitize_callback * Lint * Test for both single and double slash * Add unit tests for _sanitize_template_id * Update phpunit/class-gutenberg-rest-template-controller-test.php * Update phpunit/class-gutenberg-rest-template-controller-test.php
- Loading branch information
Showing
2 changed files
with
103 additions
and
2 deletions.
There are no files selected for viewing
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
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