wxr_cdata

Advertisement

Summery Summery

Wrap given string in XML CDATA tag.

Syntax Syntax

wxr_cdata( string $str )

Parameters Parameters

$str

(Required) String to wrap in XML CDATA tag.

Return Return

(string)

Source Source

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;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply