From: Michael Vogel Date: Sat, 28 Mar 2020 19:41:25 +0000 (+0100) Subject: Issue 8299: Don't manipulate DFRN content upon receiving X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=01d6bfd2ddc1fd87f7e95cd0dd50e5ad9458e294;p=friendica.git Issue 8299: Don't manipulate DFRN content upon receiving --- diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 5c9d19ea99..4c71de4d57 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -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