+ $body = trim($xpath->evaluate('atom:content/text()', $entry)->item(0)->nodeValue);
+
+ if ($body == "") {
+ $body = trim($xpath->evaluate('content:encoded/text()', $entry)->item(0)->nodeValue);
+ }
+ if ($body == "") {
+ $body = trim($xpath->evaluate('description/text()', $entry)->item(0)->nodeValue);
+ }
+ if ($body == "") {
+ $body = trim($xpath->evaluate('atom:summary/text()', $entry)->item(0)->nodeValue);
+ }
+
+ // remove the content of the title if it is identically to the body
+ // This helps with auto generated titles e.g. from tumblr
+ if (title_is_body($item["title"], $body)) {
+ $item["title"] = "";
+ }
+ $item["body"] = html2bbcode($body, $basepath);
+
+ if (($item["body"] == '') && ($item["title"] != '')) {
+ $item["body"] = $item["title"];
+ $item["title"] = '';
+ }
+