[wp-trac] [WordPress Trac] #21974: esc_url() doesn't allow protocol-relative URLs with colons
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 23 00:58:26 UTC 2012
#21974: esc_url() doesn't allow protocol-relative URLs with colons
----------------------------+--------------------------
Reporter: SergeyBiryukov | Type: defect (bug)
Status: new | Priority: normal
Milestone: 3.5 | Component: General
Version: | Severity: normal
Keywords: |
----------------------------+--------------------------
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/21974>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list