diff --git a/linphone-desktop/ui/modules/Linphone/Chat/Message.qml b/linphone-desktop/ui/modules/Linphone/Chat/Message.qml
index 64a138649..cad6d2135 100644
--- a/linphone-desktop/ui/modules/Linphone/Chat/Message.qml
+++ b/linphone-desktop/ui/modules/Linphone/Chat/Message.qml
@@ -59,7 +59,7 @@ Item {
// See http://doc.qt.io/qt-5/qml-qtquick-text.html#textFormat-prop
// and http://doc.qt.io/qt-5/richtext-html-subset.html
textFormat: Text.RichText // To supports links and imgs.
- wrapMode: TextEdit.Wrap
+ wrapMode: TextEdit.WordWrap
onCursorRectangleChanged: Logic.ensureVisible(cursorRectangle)
onLinkActivated: Qt.openUrlExternally(link)
diff --git a/linphone-desktop/ui/scripts/Utils/utils.js b/linphone-desktop/ui/scripts/Utils/utils.js
index 62a2e3e5e..cf8407304 100644
--- a/linphone-desktop/ui/scripts/Utils/utils.js
+++ b/linphone-desktop/ui/scripts/Utils/utils.js
@@ -50,9 +50,7 @@ function encodeTextToQmlRichFormat (text, options) {
var formattedText = execAll(UriTools.URI_REGEX, text, function (str, valid) {
if (!valid) {
- return unscapeHtml(str).replace(/\r\n|\n/g, '
')
- .replace(/\t/g, ' ')
- .replace(/ /g, ' ')
+ return unscapeHtml(str)
}
var uri = startsWith(str, 'www.') ? 'http://' + str : str
@@ -76,7 +74,7 @@ function encodeTextToQmlRichFormat (text, options) {
images = '
' + formattedText + '
') + return images.concat('' + formattedText + '
') } function extractFirstUri (str) {