check that formattedBody exists before rendering a message as HTML
In case people send HTML messages without HTML, which they do for some reason.
This commit is contained in:
parent
cd60163caf
commit
285e6ad76a
1 changed files with 2 additions and 2 deletions
|
|
@ -73,11 +73,11 @@ class const MessageRenderer(
|
|||
) => Column(
|
||||
crossAxisAlignment: .start,
|
||||
children: [
|
||||
format == .html && !textOnly
|
||||
format == .html && formattedBody != null && !textOnly
|
||||
? Html(
|
||||
roomId: event.roomId,
|
||||
textStyle: textStyle,
|
||||
formattedBody!.replaceAllMapped(
|
||||
formattedBody.replaceAllMapped(
|
||||
RegExp(
|
||||
r"(<a\b[^>]*>.*?<\/a>)|(\bhttps?:\/\/[^\s<]+)",
|
||||
caseSensitive: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue