]> git.wh0rd.org Git - tt-rss.git/commitdiff
improve tag and content detection
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 2 Dec 2005 08:47:37 +0000 (09:47 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 2 Dec 2005 08:47:37 +0000 (09:47 +0100)
functions.php

index c58afe9e70a6e10e9622628ecb08137ee6469c12..d36ee849e06010c4f1fdb556c0c179205d33d39d 100644 (file)
 
                                $entry_content = $item["content:escaped"];
 
-                               if (!$entry_content) $entry_content = $item["summary"];
                                if (!$entry_content) $entry_content = $item["content:encoded"];
                                if (!$entry_content) $entry_content = $item["content"];
+                               if (!$entry_content) $entry_content = $item["summary"];
                                if (!$entry_content) $entry_content = $item["description"];
 
-                               $entry_content_unescaped = $entry_content;
-
 //                             if (!$entry_content) continue;
 
                                // WTF
                                }
 
 //                             print_r($item);
-//                             print_r($entry_content);
+//                             print_r(htmlspecialchars($entry_content));
+//                             print "<br>";
 
+                               $entry_content_unescaped = $entry_content;
                                $content_hash = "SHA1:" . sha1(strip_tags($entry_content));
 
                                $entry_comments = $item["comments"];
 
                                $entry_tags = null;
 
-                               preg_match_all("/<a.*?href=.http:\/\/technorati.com\/tag\/([^\"\'>]+)/i", 
+                               preg_match_all("/<a.*?href=.http:\/\/.*?technorati.com\/tag\/([^\"\'>]+)/i", 
                                        $entry_content_unescaped, $entry_tags);
 
 //                             print "<br>$entry_title : $entry_content_unescaped<br>";
 //                             print_r($entry_tags);
+//                             print "<br>";
 
                                $entry_tags = $entry_tags[1];