From: Michael Date: Sat, 11 Jun 2022 06:50:59 +0000 (+0000) Subject: Issue 11625: Don't parse the title through Markdown X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d7d8a6ab55d88e579126b915d1c127bbdc91bcbb;p=friendica.git Issue 11625: Don't parse the title through Markdown --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 2f4f1444aa..9b6dd4d1a6 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -608,7 +608,7 @@ class Processor private static function processContent($activity, $item) { if (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/markdown')) { - $item['title'] = Markdown::toBBCode($activity['name']); + $item['title'] = strip_tags($activity['name']); $content = Markdown::toBBCode($activity['content']); } elseif (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/bbcode')) { $item['title'] = $activity['name']; @@ -619,6 +619,8 @@ class Processor $content = HTML::toBBCode($activity['content']); } + $item['title'] = trim(BBCode::toPlaintext($item['title'])); + if (!empty($activity['languages'])) { $item['language'] = self::processLanguages($activity['languages']); }