Make WordPress Core


Ignore:
Timestamp:
03/25/2014 01:06:21 PM (12 years ago)
Author:
nacin
Message:

Encode spaces in get_template_directory_uri() and get_stylesheet_directory_uri().

props SergeyBiryukov.
fixes #21969.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r27703 r27710  
    188188 */
    189189function get_stylesheet_directory_uri() {
    190         $stylesheet = get_stylesheet();
     190        $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
    191191        $theme_root_uri = get_theme_root_uri( $stylesheet );
    192192        $stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
     
    319319 */
    320320function get_template_directory_uri() {
    321         $template = get_template();
     321        $template = str_replace( '%2F', '/', rawurlencode( get_template() ) );
    322322        $theme_root_uri = get_theme_root_uri( $template );
    323323        $template_dir_uri = "$theme_root_uri/$template";
Note: See TracChangeset for help on using the changeset viewer.