[wp-hackers] Reason for Replacement in the_content()

Aaron D. Campbell aaron at xavisys.com
Wed Aug 5 18:31:48 UTC 2009

Shouldn't we limit that to running only if is_feed() ?  That was the 
idea of the patch for http://core.trac.wordpress.org/ticket/3670

Whether you change it or not, it seems like the ticket should probably 
be set to "fixed" and noted with the changeset?

Andy Skelton wrote:
>>    $content = str_replace(']]>', ']]>', $content);
> This is necessary for feeds. CDATA wrappers do not nest. If this
> string is in a post and you leave it intact the content's CDATA
> wrapper is prematurely closed and the feed becomes invalid XML. You
> shouldn't put CDATA wrappers in a post. But at least if you do, the
> feed won't break.
> Andy

More information about the wp-hackers mailing list