WordPress.org

Make WordPress Core

Ticket #4307: 4307.diff

File 4307.diff, 1.1 KB (added by rob1n, 13 years ago)
  • wp-includes/feed.php

     
    151151        $home = get_bloginfo_rss('home');
    152152        $the_list = '';
    153153        foreach ( (array) $categories as $category ) {
    154                 $category->cat_name = convert_chars($category->cat_name);
     154                $cat_name = convert_chars($category->cat_name);
    155155                if ( 'rdf' == $type )
    156                         $the_list .= "\n\t\t<dc:subject><![CDATA[$category->cat_name]]></dc:subject>\n";
     156                        $the_list .= "\n\t\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\n";
    157157                if ( 'atom' == $type )
    158                         $the_list .= "<category scheme='$home' term='$category->cat_name' />";
     158                        $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), attribute_escape( $category->cat_name ) );
    159159                else
    160                         $the_list .= "\n\t\t<category><![CDATA[$category->cat_name]]></category>\n";
     160                        $the_list .= "\n\t\t<category><![CDATA[$cat_name]]></category>\n";
    161161        }
    162162        return apply_filters('the_category_rss', $the_list, $type);
    163163}