Uses
Uses | Description |
---|---|
wp-includes/formatting.php: seems_utf8() | Checks to see if a string is utf8 encoded. |
Wrap given string in XML CDATA tag.
(string) (Required) String to wrap in XML CDATA tag.
(string)
File: wp-admin/includes/export.php
function wxr_cdata( $str ) { if ( ! seems_utf8( $str ) ) { $str = utf8_encode( $str ); } // $str = ent2ncr(esc_html($str)); $str = '<![CDATA[' . str_replace( ']]>', ']]]]><![CDATA[>', $str ) . ']]>'; return $str; }
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wxr_cdata