Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33155 closed defect (bug) (invalid)

category_description() wraps return value in '<p>' tags

Reported by: rob-walker's profile Rob Walker Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.3
Component: Taxonomy Keywords:
Focuses: Cc:


Calls to category_description() should return only the text or provide options for user supplied wrap tag.

It appears that the '<p>' tag is added in apply_filter( 'term_description' ) which is called from taxonomy.php: sanitize_term_field().

Change History (2)

#1 @umesh.nevase
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Hi Rob,

This is not a bug.

You can remove 'wpautop' function from 'term_description' filter.
remove_filter( 'term_description', 'wpautop' );

Last edited 9 years ago by umesh.nevase (previous) (diff)

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.