[wp-trac] [WordPress Trac] #21973: 2 bugs in wp_enqueue_style

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 23 00:46:13 UTC 2012


#21973: 2 bugs in wp_enqueue_style
--------------------------+------------------------------
 Reporter:  thomask       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  blocker       |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 I can't reproduce point 1 exactly as described, but I've found a related
 issue.

 This doesn't work:
 {{{
 wp_enqueue_style( 'twentytwelve-fonts',
 "//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700",
 array(), null );
 }}}
 The colon is the culprit. `wp_kses_bad_protocol()` reduces the URL to:
 {{{
 400italic,700italic,400,700
 }}}
 So `esc_url()` returns an empty string: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.4.2/wp-
 includes/formatting.php#L2572

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


More information about the wp-trac mailing list