URL encode the stylesheet directory values passed to WP_Theme's get_stylesheet_directory_uri() and get_template_directory_uri(). props SergeyBiryukov, see #21749.
git-svn-id: https://develop.svn.wordpress.org/trunk@21712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
93cf4c66a0
commit
80f60bd348
|
@ -794,7 +794,7 @@ final class WP_Theme implements ArrayAccess {
|
||||||
* @return string URL to the stylesheet directory.
|
* @return string URL to the stylesheet directory.
|
||||||
*/
|
*/
|
||||||
public function get_stylesheet_directory_uri() {
|
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
|
else
|
||||||
$theme_root_uri = $this->get_theme_root_uri();
|
$theme_root_uri = $this->get_theme_root_uri();
|
||||||
|
|
||||||
return $theme_root_uri . '/' . $this->template;
|
return $theme_root_uri . '/' . str_replace( '%2F', '/', rawurlencode( $this->template ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue