1
0
Fork 0

Merge pull request #8333 from MrPetovan/bug/8280-about-conversion-export

Add about field conversion to HTML in Protocol\ActivityPub\Transmitter
This commit is contained in:
Michael Vogel 2020-02-25 20:36:11 +01:00 committed by GitHub
commit cdc39b0f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View file

@ -2004,8 +2004,6 @@ class BBCode
*/
public static function toMarkdown($text, $for_diaspora = true)
{
$a = DI::app();
$original_text = $text;
// Since Diaspora is creating a summary for links, this function removes them before posting

View file

@ -264,7 +264,7 @@ class Transmitter
$data['name'] = $contact['name'];
$data['vcard:hasAddress'] = ['@type' => 'vcard:Home', 'vcard:country-name' => $profile['country-name'],
'vcard:region' => $profile['region'], 'vcard:locality' => $profile['locality']];
$data['summary'] = $contact['about'];
$data['summary'] = BBCode::convert($contact['about'], false);
$data['url'] = $contact['url'];
$data['manuallyApprovesFollowers'] = in_array($user['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]);
$data['publicKey'] = ['id' => $contact['url'] . '#main-key',

View file

@ -4135,8 +4135,7 @@ class Diaspora
$dob = DateTimeFormat::utc($year . '-' . $month . '-'. $day, 'Y-m-d');
}
$about = $profile['about'];
$about = strip_tags(BBCode::convert($about));
$about = BBCode::toMarkdown($profile['about']);
$location = Profile::formatLocation($profile);
$tags = '';