Ticket #14584: 14584.diff
File 14584.diff, 2.2 KB (added by , 15 years ago) |
---|
-
export.php
b a 137 137 if ( seems_utf8( $str ) == false ) 138 138 $str = utf8_encode( $str ); 139 139 140 // $str = ent2ncr(esc_html($str));140 $str = html_entity_decode($str); 141 141 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . "]]>"; 142 142 143 143 return $str; … … 263 263 $term_name = sanitize_term_field( 'name', $term->name, $term->term_id, $term->taxonomy, $filter ); 264 264 // Back compat. 265 265 if ( 'category' == $term->taxonomy ) 266 $the_list .= "\n\t\t<category> <![CDATA[$term_name]]></category>\n";266 $the_list .= "\n\t\t<category>" . wxr_cdata($term_name) . "</category>\n"; 267 267 elseif ( 'post_tag' == $term->taxonomy ) 268 $the_list .= "\n\t\t<category domain=\"$domain\"> <![CDATA[$term_name]]></category>\n";268 $the_list .= "\n\t\t<category domain=\"$domain\">" . wxr_cdata($term_name) . "</category>\n"; 269 269 // forwards compatibility as above 270 $the_list .= "\n\t\t<category domain=\"$domain\" nicename=\"{$term->slug}\"> <![CDATA[$term_name]]></category>\n";270 $the_list .= "\n\t\t<category domain=\"$domain\" nicename=\"{$term->slug}\">" . wxr_cdata($term_name) . "</category>\n"; 271 271 } 272 272 echo $the_list; 273 273 } … … 311 311 <wp:base_site_url><?php echo wxr_site_url(); ?></wp:base_site_url> 312 312 <wp:base_blog_url><?php bloginfo_rss( 'url' ); ?></wp:base_blog_url> 313 313 <?php if ( $cats ) : foreach ( $cats as $c ) : ?> 314 <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->name: ''; ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category>314 <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? wxr_cdata($cats[$c->parent]->name) : ''; ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category> 315 315 <?php endforeach; endif; ?> 316 316 <?php if ( $tags ) : foreach ( $tags as $t ) : ?> 317 317 <wp:tag><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag>