diff --git a/wp-app.php b/wp-app.php index 911d5aa3f..1eb0418ca 100644 --- a/wp-app.php +++ b/wp-app.php @@ -828,8 +828,12 @@ list($content_type, $content) = $this->prep_content(get_the_content()); ?> xml_parser_free($parser); if (!$code) { - $data = "
$data
"; - return array('xhtml', $data); + if (strpos($data, '<') === false) { + return array('text', $data); + } else { + $data = "
$data
"; + return array('xhtml', $data); + } } if (strpos($data, ']]>') == false) { diff --git a/wp-includes/atomlib.php b/wp-includes/atomlib.php index 352e04e52..020f0bfcb 100644 --- a/wp-includes/atomlib.php +++ b/wp-includes/atomlib.php @@ -203,7 +203,7 @@ class AtomParser { if(count($c) == 3) { array_push($newcontent, $c[2]); } else { - if($this->is_xhtml) { + if($this->is_xhtml || $this->is_text) { array_push($newcontent, $this->xml_escape($c)); } else { array_push($newcontent, $c);