aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-11-07 14:48:44 -0800
committerzotlabs <mike@macgirvin.com>2019-11-07 14:48:44 -0800
commit839c6668cfdb12934acf70e67e6721981f99a2f0 (patch)
tree474060cab80b79667390a11a3d2005bd7feca5e9 /include
parent1358a81c32ff9dff2e88b196c63f299788b05b57 (diff)
parente9a9fc50501d63998203c51e8e0d5ce4a3fcf598 (diff)
downloadvolse-hubzilla-839c6668cfdb12934acf70e67e6721981f99a2f0.tar.gz
volse-hubzilla-839c6668cfdb12934acf70e67e6721981f99a2f0.tar.bz2
volse-hubzilla-839c6668cfdb12934acf70e67e6721981f99a2f0.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-rw-r--r--include/feedutils.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 5e52828c3..9f4d732bb 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -449,6 +449,18 @@ function get_atom_elements($feed, $item) {
if (title_is_body($res['title'], $res['body']))
$res['title'] = "";
+ else {
+ $res['title'] = bbcode($res['title'], [ 'tryoembed' => false ]);
+ $res['title'] = html2plain($res['title'], 0, true);
+ $res['title'] = html_entity_decode($res['title'], ENT_QUOTES, 'UTF-8');
+ $res['title'] = preg_replace("/https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@]+/", "", $res['title']);
+ while (strpos($res['title'], "\n") !== false)
+ $res['title'] = str_replace("\n", " ", $res['title']);
+ while (strpos($res['title'], " ") !== false)
+ $res['title'] = str_replace(" ", " ", $res['title']);
+ $res['title'] = trim($res['title']);
+ }
+
if($res['plink'])
$base_url = implode('/', array_slice(explode('/',$res['plink']),0,3));