Index: wp-app.php
===================================================================
--- wp-app.php (revision 6223)
+++ wp-app.php (working copy)
@@ -12,6 +12,7 @@
require_once('./wp-config.php');
require_once(ABSPATH . WPINC . '/post-template.php');
require_once(ABSPATH . WPINC . '/atomlib.php');
+require_once(ABSPATH . WPINC . '/feed.php');
$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
@@ -785,7 +786,7 @@
ID); ?>
-prep_content(get_the_title()); ?>
+
@@ -806,7 +807,7 @@
post_content ) ) :
-list($content_type, $content) = $this->prep_content(get_the_content()); ?>
+list($content_type, $content) = prep_content(get_the_content()); ?>
@@ -814,37 +815,11 @@
-prep_content(get_the_excerpt()); ?>
+
' . $data . '', true);
- $code = xml_get_error_code($parser);
- xml_parser_free($parser);
-
- if (!$code) {
- if (strpos($data, '<') === false) {
- return array('text', $data);
- } else {
- $data = "
$data
";
- return array('xhtml', $data);
- }
- }
-
- if (strpos($data, ']]>') == false) {
- return array('html', "");
- } else {
- return array('html', htmlspecialchars($data));
- }
- }
-
function ok() {
log_app('Status','200: OK');
header('Content-Type: text/plain');
Index: wp-includes/feed-atom.php
===================================================================
--- wp-includes/feed-atom.php (revision 6223)
+++ wp-includes/feed-atom.php (working copy)
@@ -30,15 +30,18 @@
- ]]>
+
+
- ]]>
+
+
- ]]>
+
+
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php (revision 6223)
+++ wp-includes/feed.php (working copy)
@@ -250,4 +250,30 @@
}
}
+function prep_content($data) {
+ if (strpos($data, '<') === false && strpos($data, '&') === false) {
+ return array('text', $data);
+ }
+
+ $parser = xml_parser_create();
+ xml_parse($parser, '' . $data . '
', true);
+ $code = xml_get_error_code($parser);
+ xml_parser_free($parser);
+
+ if (!$code) {
+ if (strpos($data, '<') === false) {
+ return array('text', $data);
+ } else {
+ $data = "$data
";
+ return array('xhtml', $data);
+ }
+ }
+
+ if (strpos($data, ']]>') == false) {
+ return array('html', "");
+ } else {
+ return array('html', htmlspecialchars($data));
+ }
+}
+
?>