URL encode the theme stylesheet passed into wp_customize_url(). see #21749.

git-svn-id: http://core.svn.wordpress.org/trunk@21713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-03 23:58:30 +00:00
parent e03640b121
commit 1635740139
1 changed files with 2 additions and 1 deletions

View File

@ -1646,11 +1646,12 @@ add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
* @since 3.4.0
*
* @param string $stylesheet Optional. Theme to customize. Defaults to current theme.
* The theme's stylesheet will be urlencoded if necessary.
*/
function wp_customize_url( $stylesheet = null ) {
$url = admin_url( 'customize.php' );
if ( $stylesheet )
$url .= '?theme=' . $stylesheet;
$url .= '?theme=' . urlencode( $stylesheet );
return esc_url( $url );
}