URL encode the stylesheet directory values passed to WP_Theme's get_stylesheet_directory_uri() and get_template_directory_uri(). props SergeyBiryukov, see #21749. for the 3.4 branch.

git-svn-id: http://core.svn.wordpress.org/branches/3.4@21714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-04 02:16:12 +00:00
parent 309b4fe8fe
commit 149e698a77
1 changed files with 2 additions and 2 deletions

View File

@ -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 ) );
}
/**