[wp-trac] [WordPress Trac] #23605: esc_url() strips spaces instead of encoding them

WordPress Trac noreply at wordpress.org
Wed Aug 26 17:38:46 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 miqrogroove):

 Replying to [comment:12 betzster]:
 > Can't we just lean on `rawurlencode()` to encode everything properly?

 Nope.  The purpose of esc_url appears to be removal of non-printing
 special characters.  If we make it an alias of rawurlencode, it will also
 encode colons and slashes, making most URLs invalid.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23605#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list