]> git.mxchange.org Git - friendica.git/commitdiff
preserve body content in feed to extract microformat stuff
authorFriendika <info@friendika.com>
Wed, 12 Jan 2011 21:21:37 +0000 (13:21 -0800)
committerFriendika <info@friendika.com>
Wed, 12 Jan 2011 21:21:37 +0000 (13:21 -0800)
include/items.php

index d267abe075553b76ef3df001b29105e9706cf785..4c18938b0a3a7879a2b562b3da18fc98c06e4a81 100644 (file)
@@ -452,6 +452,8 @@ function get_atom_elements($feed,$item) {
                        $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data'];
                        if(! $body)
                                $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data'];
+                       // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events
+                       $res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n";
                        if(strpos($body,'<')) {
 
                                $body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
@@ -489,6 +491,8 @@ function get_atom_elements($feed,$item) {
                        $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data'];
                        if(! $body)
                                $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data'];
+                       // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events
+                       $res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n";
                        if(strpos($body,'<')) {
 
                                $body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',