From 01d6bfd2ddc1fd87f7e95cd0dd50e5ad9458e294 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 28 Mar 2020 20:41:25 +0100 Subject: [PATCH] Issue 8299: Don't manipulate DFRN content upon receiving --- src/Protocol/DFRN.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) 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