WordPress.org

Make WordPress Core

Ticket #3595: bookmark-template-php-2-3.diff

File bookmark-template-php-2-3.diff, 2.0 KB (added by jhodgdon, 7 years ago)

New patch using sanitize_bookmark_field function for 2.3

  • E:/EclipseWork/WordPressDev/wp-includes/bookmark-template.php

     
    9696                if ( '' != $rel ) 
    9797                        $rel = ' rel="' . $rel . '"'; 
    9898 
    99                 $desc = attribute_escape($row->link_description); 
    100                 $name = attribute_escape($row->link_name); 
     99                $desc = attribute_escape(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display')); 
     100                $name = attribute_escape(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display')); 
    101101                $title = $desc; 
    102102 
    103103                if ( $show_updated ) 
     
    145145} 
    146146 
    147147function get_linkrating($link) { 
    148         return apply_filters('link_rating', $link->link_rating); 
     148        return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); 
    149149} 
    150150 
    151151/** function get_linkcatname() 
     
    229229                        // Handle each category. 
    230230 
    231231                        // Display the category name 
    232                         echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . $cat->name . "</h2>\n\t<ul>\n"; 
     232                        echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n"; 
    233233                        // Call get_links() with all the appropriate params 
    234234                        get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false); 
    235235 
     
    264264                if ( '' != $rel ) 
    265265                        $rel = ' rel="' . $rel . '"'; 
    266266 
    267                 $desc = attribute_escape(apply_filters('link_description', $bookmark->link_description));  
    268                 $name = attribute_escape(apply_filters('link_title', $bookmark->link_name));  
     267                $desc = attribute_escape(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display')); 
     268                $name = attribute_escape(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display')); 
    269269                $title = $desc; 
    270270 
    271271                if ( $show_updated )