[wp-trac] [WordPress Trac] #23605: esc_url() strips spaces instead of encoding them
WordPress Trac
noreply at wordpress.org
Wed Sep 2 00:20:02 UTC 2015
#23605: esc_url() strips spaces instead of encoding them
------------------------------------------+------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4
Component: Formatting | Version: 2.8
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------
Comment (by enshrined):
The above patch adds a str_replace call as the first thing in esc_url.
This makes sure that spaces are not stripped but rather replaced by `%20`.
It also updates the tests to reflect these changes.
It may be worth deciding what happens for multiple spaces, should these
stay in the form of `%20%20` or be stripped down to a single `%20`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23605#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list