diff options
author | Friendika <info@friendika.com> | 2011-01-12 13:21:37 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-12 13:21:37 -0800 |
commit | 89a28bf0f7b43c4bafdfde794066aefe705efa89 (patch) | |
tree | 25ccfe74f969848198553a45a0f536c0ee1d91f8 | |
parent | 2d80c601df1e2f80033194e44d90380c26e42346 (diff) | |
download | volse-hubzilla-89a28bf0f7b43c4bafdfde794066aefe705efa89.tar.gz volse-hubzilla-89a28bf0f7b43c4bafdfde794066aefe705efa89.tar.bz2 volse-hubzilla-89a28bf0f7b43c4bafdfde794066aefe705efa89.zip |
preserve body content in feed to extract microformat stuff
-rw-r--r-- | include/items.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index d267abe07..4c18938b0 100644 --- a/include/items.php +++ b/include/items.php @@ -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', |