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

WordPress Trac noreply at wordpress.org
Mon Sep 2 01:28:31 UTC 2013


#23605: esc_url() strips spaces instead of encoding them
--------------------------+------------------------------
 Reporter:  johnbillion   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by DrandLomB):

 I'm admittedly not a seasoned developer, but I too want to register my
 dismay with the esc_url() function. If WordPress wants us to use this type
 of function on a religious basis as suggested by the documentation, then
 it should help, not hinder.

 Regardless how accurately the Codex may document that it "escapes" versus
 "encodes" or whatever other technical nuances one may wish to apply, the
 fact is that what we want is a function that reliably returns what we give
 it ready to output safely. Discarding perfectly valid spaces is hardly
 accomplishing that!

 As is, I'll have to wrap this in my own function to first encode
 characters before I can give it to esc_url(). Unless I'm really missing
 the point, it seems very unhelpful as is.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23605#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list