Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#27134 closed defect (bug) (duplicate)

the_content() contains unexpected hard coded string replacement

Reported by: awelzel Owned by:
Priority: normal Milestone:
Component: Formatting Version: 3.8.1
Severity: normal Keywords:
Cc: Focuses:

Description

In wp-includes/post-template.php the function the_content() has an unexpected string replacemenet:

function the_content( $more_link_text = null, $strip_teaser = false) {
	$content = get_the_content( $more_link_text, $strip_teaser );
	$content = apply_filters( 'the_content', $content );
	$content = str_replace( ']]>', ']]>', $content );
	echo $content;
}

This makes no sense at all and breaks CDATA blocks. Why?

Suggested solution: Remove the line

	$content = str_replace( ']]>', ']]>', $content );

and implement a filter to do this replacement where neccessary.

Change History (1)

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #3670.

Note: See TracTickets for help on using tickets.