diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-30 16:49:38 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-30 16:49:38 +0000 |
| commit | d85d717aedbc7690e2a450e40dab8fcebd94b38c (patch) | |
| tree | a7340a14bb1192e977fca4f26beef29869e17579 /wp-includes/feed.php | |
| parent | 9817ff2d282c68faaa09232845829b96f207e72b (diff) | |
| download | wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.tar.gz wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.tar.xz wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.zip | |
Merge with WordPress 2.3.1
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1139 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/feed.php')
| -rw-r--r-- | wp-includes/feed.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 6b431b1..8f9219c 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -250,47 +250,4 @@ function atom_enclosure() { } } -/** - * prep_atom_text_construct() - determine if given string of data is - * type text, html, or xhtml, per RFC 4287 section 3.1. - * - * In the case of WordPress, text is defined as containing no markup, - * xhtml is defined as "well formed", and html as tag soup (i.e., the rest). - * - * Container div tags are added to xhtml values, per section 3.1.1.3. - * - * @package WordPress - * @subpackage Feed - * @since 2.4 - * - * @param string $data input string - * @return array $result array(type, value) - * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 - */ -function prep_atom_text_construct($data) { - if (strpos($data, '<') === false && strpos($data, '&') === false) { - return array('text', $data); - } - - $parser = xml_parser_create(); - xml_parse($parser, '<div>' . $data . '</div>', true); - $code = xml_get_error_code($parser); - xml_parser_free($parser); - - if (!$code) { - if (strpos($data, '<') === false) { - return array('text', $data); - } else { - $data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>"; - return array('xhtml', $data); - } - } - - if (strpos($data, ']]>') == false) { - return array('html', "<![CDATA[$data]]>"); - } else { - return array('html', htmlspecialchars($data)); - } -} - ?> |
