wxr_cdata() – Wrap given string in XML CDATA tag.

You appear to be a bot. Output may be restricted

Description

Wrap given string in XML CDATA tag.

Usage

$string = wxr_cdata( $str );

Parameters

$str
( string ) required – String to wrap in XML CDATA tag.

Returns

string

Source

File name: wordpress/wp-admin/includes/export.php
Lines:

1 to 9 of 9
  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;
  }
 

 View on GitHub View on Trac