Fix switching bug and br tag in firefox

This commit is contained in:
Florian Duros 2022-10-26 18:18:34 +02:00
parent 423f87a43a
commit 928a23e9d0
No known key found for this signature in database
GPG key ID: 9700AA5870258A0B
2 changed files with 3 additions and 1 deletions

View file

@ -82,7 +82,8 @@ export function createMessageContent(
// const body = textSerialize(model);
const body = isHTML && htmlToPlainText(message) || message;
// TODO remove this ugly hack for replace br tag
const body = isHTML && htmlToPlainText(message) || message.replace(/<br>/g, '\n');
const bodyPrefix = isReplyAndEditing && getTextReplyFallback(editedEvent) || '';
const formattedBodyPrefix = isReplyAndEditing && getHtmlReplyFallback(editedEvent) || '';