WordPress.org

Make WordPress Core

Changeset 21712


Ignore:
Timestamp:
09/03/2012 11:57:43 PM (6 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

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

    r21686 r21712  
    795795     */
    796796    public function get_stylesheet_directory_uri() {
    797         return $this->get_theme_root_uri() . '/' . $this->stylesheet;
     797        return $this->get_theme_root_uri() . '/' . str_replace( '%2F', '/', rawurlencode( $this->stylesheet ) );
    798798    }
    799799
     
    815815            $theme_root_uri = $this->get_theme_root_uri();
    816816
    817         return $theme_root_uri . '/' . $this->template;
     817        return $theme_root_uri . '/' . str_replace( '%2F', '/', rawurlencode( $this->template ) );
    818818    }
    819819
Note: See TracChangeset for help on using the changeset viewer.