Make WordPress Core


Ignore:
Timestamp:
12/21/2006 10:10:04 AM (20 years ago)
Author:
markjaquith
Message:

new function for escaping within attributes: attribute_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r4598 r4656  
    510510                        $css_class .= ' current_page_parent';
    511511
    512                 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . wp_specialchars($page->post_title, 1) . '">' . $page->post_title . '</a>';
     512                $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape($page->post_title) . '">' . $page->post_title . '</a>';
    513513       
    514514                if ( !empty($show_date) ) {
    … …  
    576576                extract($args);
    577577
    578                 $cat_name = wp_specialchars( $category->cat_name, 1 );
     578                $cat_name = attribute_escape( $category->cat_name);
    579579                $link = '<a href="' . get_category_link( $category->cat_ID ) . '" ';
    580580                if ( $use_desc_for_title == 0 || empty($category->category_description) )
    581581                        $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
    582582                else
    583                         $link .= 'title="' . wp_specialchars( apply_filters( 'category_description', $category->category_description, $category ), 1 ) . '"';
     583                        $link .= 'title="' . attribute_escape( apply_filters( 'category_description', $category->category_description, $category )) . '"';
    584584                $link .= '>';
    585585                $link .= apply_filters( 'list_cats', $category->cat_name, $category ).'</a>';
Note: See TracChangeset for help on using the changeset viewer.