]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Feed.php
Merge pull request #9146 from tobiasd/2020.09-CHANGELOG
[friendica.git] / src / Protocol / Feed.php
index 2873f44e12d050de818e84d6f966f8c75d4c336e..67baf4b2aebf6412945579c7d3ca8e3cdf654bd2 100644 (file)
@@ -494,6 +494,9 @@ class Feed
                        }
                        $item["body"] = HTML::toBBCode($body, $basepath);
 
+                       // Remove tracking pixels
+                       $item["body"] = preg_replace("/\[img=1x1\]([^\[\]]*)\[\/img\]/Usi", '', $item["body"]);
+
                        if (($item["body"] == '') && ($item["title"] != '')) {
                                $item["body"] = $item["title"];
                                $item["title"] = '';
@@ -563,7 +566,7 @@ class Feed
                                $data_text = strip_tags(trim($data['text'] ?? ''));
                                $item_body = strip_tags(trim($item['body'] ?? ''));
 
-                               if (!empty($data['text']) && (($data_text == $item_body) || strstr($item_body, $data_text))) {
+                               if (!empty($data_text) && (($data_text == $item_body) || strstr($item_body, $data_text))) {
                                        $data['text'] = '';
                                }