[wp-trac] [WordPress Trac] #39145: custom-background URL escaped

WordPress Trac noreply at wordpress.org
Wed Dec 7 17:21:02 UTC 2016


#39145: custom-background URL escaped
--------------------------+-----------------------------
 Reporter:  futtta        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7.1
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------

Comment (by westonruter):

 In [attachment:39145.diff] we should add double quotes to surround the
 `esc_url()` call. The `wp_json_encode()` function adds those double-quotes
 for us. If we could rely on there being a higher version of PHP, we could
 have used `wp_json_encode()` with `JSON_UNESCAPED_SLASHES` but
 unfortunately it is not available in PHP 5.2. I'm not totally sure that
 `esc_url()` will work for URLs that have characters that get encoded as
 entities. For example, will browsers decode `&`?

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


More information about the wp-trac mailing list