Escape text titles in AtomParser. Props Sam Ruby. fixes #4892
git-svn-id: http://svn.automattic.com/wordpress/trunk@6010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2662be2098
commit
d723ff00d8
|
@ -828,8 +828,12 @@ list($content_type, $content) = $this->prep_content(get_the_content()); ?>
|
|||
xml_parser_free($parser);
|
||||
|
||||
if (!$code) {
|
||||
$data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>";
|
||||
return array('xhtml', $data);
|
||||
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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue