Make WordPress Core


Ignore:
Timestamp:
05/22/2009 05:44:26 PM (15 years ago)
Author:
westi
Message:

Introduce sanitise_css_classname() and use it to give categories, tags, users etc meaningful classnames where possible. Falls back to the id if not. Fixes #8446.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r11383 r11433  
    295295        // For all registered users, 'byuser'
    296296        $classes[] = 'byuser';
    297         $classes[] = 'comment-author-' . $comment->user_id;
     297        $classes[] = 'comment-author-' . sanitise_css_classname($user->user_nicename, $comment->user_id);
    298298        // For comment authors who are the author of the post
    299299        if ( $post = get_post($post_id) ) {
Note: See TracChangeset for help on using the changeset viewer.