Created
August 31, 2011 16:57
-
-
Save champierre/1184054 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 121 function wxr_cdata( $str ) { | |
| 122 if ( seems_utf8( $str ) == false ) | |
| 123 $str = utf8_encode( $str ); | |
| 124 | |
| 125 // $str = ent2ncr(esc_html($str)); | |
| 126 $str = str_replace(']]>', ']]]]><![CDATA[>', $str); // <= Add This | |
| 127 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '' ) . ']]>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment