diff options
author | nobody <nobody@zotlabs.com> | 2021-04-05 23:15:01 -0700 |
---|---|---|
committer | nobody <nobody@zotlabs.com> | 2021-04-05 23:15:01 -0700 |
commit | 9359fc065c72243bd85f0fc3db842976f07183cc (patch) | |
tree | 37551feefe6fff472b9c346a7a8c3cd9080d8946 /include/feedutils.php | |
parent | 878be8fff0328ee4ab978de20e7e385244ac54ec (diff) | |
parent | 19daadbfd7f281e27dffdc53d0e8ebeb837e1ae3 (diff) | |
download | volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.gz volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.bz2 volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/feedutils.php')
-rw-r--r-- | include/feedutils.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/feedutils.php b/include/feedutils.php index 352b8f038..6cae14a01 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -440,8 +440,7 @@ function get_atom_elements($feed, $item) { $summary = ''; if(($summary) && ((strpos($summary,'<') !== false) || (strpos($summary,'>') !== false))) { - $summary = purify_html($summary); - $summary = html2bbcode($summary); + $summary = html2plain($summary); } @@ -722,17 +721,17 @@ function get_atom_elements($feed, $item) { if(! $type) $type = 'application/octet-stream'; - if($ostatus_protocol) { - if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) { - $res['body'] .= "\n\n" . '[img]' . $link . '[/img]'; - } - if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) { - $res['body'] .= "\n\n" . '[video]' . $link . '[/video]'; - } - if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) { - $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]'; - } + // put media enclosures in bbcode markup + if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) { + $res['body'] .= "\n\n" . '[img]' . $link . '[/img]'; } + if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) { + $res['body'] .= "\n\n" . '[video]' . $link . '[/video]'; + } + if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) { + $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]'; + } + $res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title ); } } |