fix: Encode component for links correctly

This commit is contained in:
Krille 2024-01-15 09:32:24 +01:00
parent 913cedf507
commit e39f046b1e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -46,7 +46,7 @@ class HtmlMessage extends StatelessWidget {
final newHtml = parts
.map(
(linkifyElement) => linkifyElement is! UrlElement
? linkifyElement.text
? Uri.encodeComponent(linkifyElement.text)
: '<a href="${linkifyElement.text}">${linkifyElement.text}</a>',
)
.join(' ');