[wp-hackers] the_content breaking XHTML validity

Ryan Scheuermann ryan at concept64.com
Tue May 2 11:48:18 GMT 2006


Hey all,

Had a bit of trouble yesterday with the "the_content" function escaping 
some JS code and for the life of me, I couldn't find the filter that was 
causing the problem, and then I discovered this:

function the_content($more_link_text = '(more...)', $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);    <---  WHY HERE?
    echo $content;
}


Can someone with a broader sense of the system explain why the_content 
is doing this here instead of in the filter?  Is this a bug or is there 
a reason I'm not seeing?  Trunk code, btw.

Thanks!

Ryan Scheuermann

-- 
----
Concept 64, Inc. | Phone: 610.349.0703 | Web: www.concept64.com



More information about the wp-hackers mailing list