]> git.wh0rd.org Git - tt-rss.git/commitdiff
work around yet another magpie parsing bug (closes #174)
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 21 Nov 2007 05:24:46 +0000 (06:24 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 21 Nov 2007 05:24:46 +0000 (06:24 +0100)
functions.php

index 0f3cdefab5ff424cc70a7570cfa17c7cf962ce65..8e81b3cce09254d72eaefbb07da13c4dda8d5b53 100644 (file)
 
                                if ($_GET['xdebug']) {
                                        print_r($item);
+
                                }
 
                                if (ENABLE_SIMPLEPIE) {
 
                                        if (!$entry_content) $entry_content = $item["content:encoded"];
                                        if (!$entry_content) $entry_content = $item["content"];
+
+                                       // Magpie bugs are getting ridiculous
+                                       if (trim($entry_content) == "Array") $entry_content = false;
+
                                        if (!$entry_content) $entry_content = $item["atom_content"];
                                        if (!$entry_content) $entry_content = $item["summary"];
                                        if (!$entry_content) $entry_content = $item["description"];
                                        if (is_array($entry_content)) {
                                                $entry_content = $entry_content["encoded"];
                                                if (!$entry_content) $entry_content = $entry_content["escaped"];
-                                       }
+                                       } 
                                }
 
-//                             print_r($item);
-//                             print_r(htmlspecialchars($entry_content));
-//                             print "<br>";
+                               if ($_GET["xdebug"]) {
+                                       print "update_rss_feed: content: ";
+                                       print_r(htmlspecialchars($entry_content));
+                               }
 
                                $entry_content_unescaped = $entry_content;