[wp-hackers] Reason for Replacement in the_content()
Andy Skelton
skeltoac at gmail.com
Wed Aug 5 15:21:45 UTC 2009
> $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