diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index bad0416af..f9aaa8c50 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -358,10 +358,7 @@ static void sendMail (QString sAddress, QString sSubject, QString sBody) { #ifdef Q_WS_WIN /* search and replace the end of lines with: "%0D%0A" */ - size_t loc; - while ((loc = sBody.find("\n")) != sBody.npos) { - sBody.replace(loc, 1, "%0D%0A"); - } + sBody.replace("\n", "%0D%0A"); #endif QUrl url = QUrl("mailto:" + sAddress);