From 16357401390fb51ee8ab8fcd606b4ec9b4cd3124 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 3 Sep 2012 23:58:30 +0000 Subject: [PATCH] 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 --- wp-includes/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index b7e0398e40..9557cd2964 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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 ); }