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
3 changed files with 2 additions and 5 deletions
|
@ -2004,8 +2004,6 @@ class BBCode
|
||||||
*/
|
*/
|
||||||
public static function toMarkdown($text, $for_diaspora = true)
|
public static function toMarkdown($text, $for_diaspora = true)
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
|
||||||
|
|
||||||
$original_text = $text;
|
$original_text = $text;
|
||||||
|
|
||||||
// Since Diaspora is creating a summary for links, this function removes them before posting
|
// 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['name'] = $contact['name'];
|
||||||
$data['vcard:hasAddress'] = ['@type' => 'vcard:Home', 'vcard:country-name' => $profile['country-name'],
|
$data['vcard:hasAddress'] = ['@type' => 'vcard:Home', 'vcard:country-name' => $profile['country-name'],
|
||||||
'vcard:region' => $profile['region'], 'vcard:locality' => $profile['locality']];
|
'vcard:region' => $profile['region'], 'vcard:locality' => $profile['locality']];
|
||||||
$data['summary'] = $contact['about'];
|
$data['summary'] = BBCode::convert($contact['about'], false);
|
||||||
$data['url'] = $contact['url'];
|
$data['url'] = $contact['url'];
|
||||||
$data['manuallyApprovesFollowers'] = in_array($user['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]);
|
$data['manuallyApprovesFollowers'] = in_array($user['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]);
|
||||||
$data['publicKey'] = ['id' => $contact['url'] . '#main-key',
|
$data['publicKey'] = ['id' => $contact['url'] . '#main-key',
|
||||||
|
|
|
@ -4135,8 +4135,7 @@ class Diaspora
|
||||||
$dob = DateTimeFormat::utc($year . '-' . $month . '-'. $day, 'Y-m-d');
|
$dob = DateTimeFormat::utc($year . '-' . $month . '-'. $day, 'Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
||||||
$about = $profile['about'];
|
$about = BBCode::toMarkdown($profile['about']);
|
||||||
$about = strip_tags(BBCode::convert($about));
|
|
||||||
|
|
||||||
$location = Profile::formatLocation($profile);
|
$location = Profile::formatLocation($profile);
|
||||||
$tags = '';
|
$tags = '';
|
||||||
|
|
Loading…
Reference in a new issue