WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33155 closed defect (bug) (invalid)

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

Reported by: Rob Walker Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.3
Component: Taxonomy Keywords:
Focuses: Cc:

Description

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
2 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 2 years ago by umesh.nevase (previous) (diff)

#2 @SergeyBiryukov
2 years ago

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