4
0
Fork 1

[UTIL][Formatting] Mention title is not always defined

Dieser Commit ist enthalten in:
Eliseu Amaro 2022-01-13 18:07:19 +00:00
Ursprung fa9df9962e
Commit eff9318c1d
Signiert von: eliseuamaro
GPG-Schlüssel-ID: 96DA09D4B97BC2D5
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -450,7 +450,7 @@ abstract class Formatting
foreach ($points as $position => $mention) {
$linkText = self::linkifyMentionArray($mention);
$text = substr_replace($text, $linkText, $position-1, $mention['length']+1);
$text = substr_replace($text, $linkText, $position - 1, $mention['length'] + 1);
}
return [$text, $mentions];
@ -471,7 +471,7 @@ abstract class Formatting
}
$output = HTML::html(['span' => ['attrs' => ['class' => 'h-card'],
'@' . HTML::html(['a' => ['attrs' => $attrs, $mention['title']]], options: ['indent' => false]),
'@' . HTML::html(['a' => ['attrs' => $attrs, $mention['title'] ?? $mention['text']]], options: ['indent' => false]),
]], options: ['indent' => false, 'raw' => true]);
Event::handle('EndLinkifyMention', [$mention, &$output]);