]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8299: Don't manipulate DFRN content upon receiving
authorMichael Vogel <icarus@dabo.de>
Sat, 28 Mar 2020 19:41:25 +0000 (20:41 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 28 Mar 2020 19:41:25 +0000 (20:41 +0100)
src/Protocol/DFRN.php

index 5c9d19ea99e36ddc46d83f8bab691a6e82b8bac6..4c71de4d57554f81dacc1edbd6f3e3f4f118b20c 100644 (file)
@@ -2369,32 +2369,11 @@ class DFRN
 
                $item["body"] = XML::getFirstNodeValue($xpath, "dfrn:env/text()", $entry);
                $item["body"] = str_replace([' ',"\t","\r","\n"], ['','','',''], $item["body"]);
-               // make sure nobody is trying to sneak some html tags by us
+
                $item["body"] = Strings::base64UrlDecode($item["body"]);
 
                $item["body"] = BBCode::limitBodySize($item["body"]);
 
-               /// @todo Do we really need this check for HTML elements? (It was copied from the old function)
-               if ((strpos($item['body'], '<') !== false) && (strpos($item['body'], '>') !== false)) {
-                       $base_url = DI::baseUrl()->get();
-                       $item['body'] = HTML::relToAbs($item['body'], $base_url);
-
-                       $item['body'] = HTML::toBBCodeVideo($item['body']);
-
-                       $item['body'] = OEmbed::HTML2BBCode($item['body']);
-
-                       $config = HTMLPurifier_Config::createDefault();
-                       $config->set('Cache.DefinitionImpl', null);
-
-                       // we shouldn't need a whitelist, because the bbcode converter
-                       // will strip out any unsupported tags.
-
-                       $purifier = new HTMLPurifier($config);
-                       $item['body'] = $purifier->purify($item['body']);
-
-                       $item['body'] = @HTML::toBBCode($item['body']);
-               }
-
                /// @todo We should check for a repeated post and if we know the repeated author.
 
                // We don't need the content element since "dfrn:env" is always present