WordPress.org

Make WordPress Core

Ticket #9753: t9753-strip-tags-cat-desc-title-attribute.diff

File t9753-strip-tags-cat-desc-title-attribute.diff, 682 bytes (added by demetris, 5 years ago)

strip_tags from cat desc when used as TITLE attribute

  • wp-includes/classes.php

     
    13311331                if ( $use_desc_for_title == 0 || empty($category->description) ) 
    13321332                        $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"'; 
    13331333                else 
    1334                         $link .= 'title="' . esc_attr( apply_filters( 'category_description', $category->description, $category )) . '"'; 
     1334                        $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"'; 
    13351335                $link .= '>'; 
    13361336                $link .= $cat_name . '</a>'; 
    13371337