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:
commit
cdc39b0f72
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue