]> git.mxchange.org Git - friendica.git/commitdiff
The "summary" field seems to be interpreted as plain text only
authorMichael <heluecht@pirati.ca>
Mon, 18 Mar 2019 22:38:10 +0000 (22:38 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 18 Mar 2019 22:38:10 +0000 (22:38 +0000)
src/Protocol/ActivityPub/Transmitter.php

index 8f9687a804f35258031f0a03d2855fa1584d8632..ce23e6db209910d7530ccb1376ffe58132d66ac1 100644 (file)
@@ -1021,7 +1021,7 @@ class Transmitter
                        return $data;
                }
 
-               $data['summary'] = BBCode::convert(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB), false, 7);
+               $data['summary'] = BBCode::toPlaintext(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB));
 
                if ($item['uri'] != $item['thr-parent']) {
                        $data['inReplyTo'] = $item['thr-parent'];
@@ -1056,7 +1056,7 @@ class Transmitter
                if ($type == 'Note') {
                        $body = self::removePictures($body);
                } elseif (($type == 'Article') && empty($data['summary'])) {
-                       $data['summary'] = BBCode::convert(Plaintext::shorten(self::removePictures($body), 1000), false, 7);
+                       $data['summary'] = BBCode::toPlaintext(Plaintext::shorten(self::removePictures($body), 1000));
                }
 
                if ($type == 'Event') {