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

Charles K. Clarkson cclarkson at htcomp.net
Wed Aug 5 15:18:00 UTC 2009


Hi,

In the the_content() function there is a string replacement after the filter
for ']]>'. Anyone know what it is for? What case is it catching? The only
case I can think of is JavaScript tags, but why do that?

<script type="text/javascript"><!--//--><![CDATA[//><!--
...
//--><!]]></script>


function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') {
     $content = get_the_content($more_link_text, $stripteaser, $more_file);
     $content = apply_filters('the_content', $content);
     $content = str_replace(']]>', ']]&gt;', $content);
     echo $content;
}

TIA,

Charles Clarkson
-- 
Mobile Home Investor
Free Market Advocate
Programmer

I'm not really a smart person. I just play one on the Internet.

Stephenville, TX
http://www.clarksonenergyhomes.com/wordpress/about/
http://twitter.com/CharlesClarkson
+1 (254) 968-8328


More information about the wp-hackers mailing list