diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 8be643327b..13ccfc29e8 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -794,7 +794,7 @@ final class WP_Theme implements ArrayAccess { * @return string URL to the stylesheet directory. */ public function get_stylesheet_directory_uri() { - return $this->get_theme_root_uri() . '/' . $this->stylesheet; + return $this->get_theme_root_uri() . '/' . str_replace( '%2F', '/', rawurlencode( $this->stylesheet ) ); } /** @@ -814,7 +814,7 @@ final class WP_Theme implements ArrayAccess { else $theme_root_uri = $this->get_theme_root_uri(); - return $theme_root_uri . '/' . $this->template; + return $theme_root_uri . '/' . str_replace( '%2F', '/', rawurlencode( $this->template ) ); } /**