[wp-trac] [WordPress Trac] #47889: uploading image contains special characters will return a wrong image url

WordPress Trac noreply at wordpress.org
Sat Aug 17 14:20:24 UTC 2019


#47889: uploading image contains special characters will return a wrong image url
--------------------------+------------------------------
 Reporter:  sockscap64    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  5.2.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by donmhico):

 * keywords:   => has-patch


Comment:

 Hello @sockscap64,

 Welcome to our trac. Thank you for your bug report. I confirmed the bug on
 my side as well and I attached a patch that fixes it.

 In my attached patch,
 [https://core.trac.wordpress.org/attachment/ticket/47889/47889.diff
 47889.diff], you'll see that I removed the wrapping `esc_url()`. I think
 it's safe to do this since the image url comes from
 `wp_get_attachment_image_src()` which is expected to return an array with
 a url as the first element if the image exist.

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


More information about the wp-trac mailing list