WordPress 3.4.2
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-upgrader.php
index c70ef66bbb732d4797c32ac0a697b1d5332cd010..846cbe5f335eb2d5ef14fca8a0309037ff86a36b 100644 (file)
@@ -1507,14 +1507,14 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
 
                $preview_link = add_query_arg( array(
                        'preview'    => 1,
-                       'template'   => $template,
-                       'stylesheet' => $stylesheet,
+                       'template'   => urlencode( $template ),
+                       'stylesheet' => urlencode( $stylesheet ),
                ), trailingslashit( get_home_url() ) );
 
                $activate_link = add_query_arg( array(
                        'action'     => 'activate',
-                       'template'   => $template,
-                       'stylesheet' => $stylesheet,
+                       'template'   => urlencode( $template ),
+                       'stylesheet' => urlencode( $stylesheet ),
                ), admin_url('themes.php') );
                $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
 
@@ -1571,14 +1571,14 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
 
                        $preview_link = add_query_arg( array(
                                'preview'    => 1,
-                               'template'   => $template,
-                               'stylesheet' => $stylesheet,
+                               'template'   => urlencode( $template ),
+                               'stylesheet' => urlencode( $stylesheet ),
                        ), trailingslashit( get_home_url() ) );
 
                        $activate_link = add_query_arg( array(
                                'action'     => 'activate',
-                               'template'   => $template,
-                               'stylesheet' => $stylesheet,
+                               'template'   => urlencode( $template ),
+                               'stylesheet' => urlencode( $stylesheet ),
                        ), admin_url('themes.php') );
                        $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );