Make WordPress Core


Ignore:
Timestamp:
09/04/2012 02:16:12 AM (12 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. for the 3.4 branch.

File:
1 edited

Legend:

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

    r21699 r21714  
    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.