Make WordPress Core


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

new function for escaping within attributes: attribute_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/comment-functions.php

    r4300 r4656  
    316316            echo ' class="'.$CSSclass.'"';
    317317        }
    318         $title = wp_specialchars(apply_filters('the_title', get_the_title()), true);
     318        $title = attribute_escape(apply_filters('the_title', get_the_title()));
    319319        echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
    320320        comments_number($zero, $one, $more, $number);
     
    898898        $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]);
    899899        $comment_author = stripslashes($comment_author);
    900         $comment_author = wp_specialchars($comment_author, true);
     900        $comment_author = attribute_escape($comment_author);
    901901        $_COOKIE['comment_author_'.COOKIEHASH] = $comment_author;
    902902    }
     
    905905        $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]);
    906906        $comment_author_email = stripslashes($comment_author_email);
    907         $comment_author_email = wp_specialchars($comment_author_email, true);   
     907        $comment_author_email = attribute_escape($comment_author_email);   
    908908        $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email;
    909909    }
     
    912912        $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]);
    913913        $comment_author_url = stripslashes($comment_author_url);
    914         $comment_author_url = wp_specialchars($comment_author_url, true);
     914        $comment_author_url = attribute_escape($comment_author_url);
    915915        $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url;
    916916    }
Note: See TracChangeset for help on using the changeset viewer.