WordPress.org

Make WordPress Core

Ticket #4273: 4273.diff

File 4273.diff, 618 bytes (added by westi, 14 years ago)

A simpler fix

  • wp-includes/link-template.php

     
    140140        $pagestruct = $wp_rewrite->get_page_permastruct();
    141141
    142142        if ( '' != $pagestruct && 'draft' != $post->post_status ) {
    143                 $link = get_page_uri($id);
     143                // Encode the page uri as it comes back in a raw form   
     144                $link = urlencode(get_page_uri($id));
    144145                $link = str_replace('%pagename%', $link, $pagestruct);
    145146                $link = get_option('home') . "/$link";
    146147                $link = user_trailingslashit($link, 'page');