• I have a strange string replacement in a function that dates back to 2005.

    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);

    The only thing I can think of is that it is matching correctly encoded JavaScript in an (x)html document. That is such an obscure case though and this original version of the function didn’t strip html tags.

    <script type="text/javascript"><!--//--><![CDATA[//><!--
    ...
    //--><!]]></script>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Strange String Replacement for “]]>”’ is closed to new replies.