diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index df4a79588..5a6757b3a 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -2149,8 +2149,7 @@ void TorrentsController::setCommentAction() requireParams({u"hashes"_s, u"comment"_s}); const QStringList hashes {params()[u"hashes"_s].split(u'|')}; - const QString comment = params()[u"comment"_s].trimmed() - .replace(QRegularExpression(u"\r?\n"_s), u" "_s); + const QString comment = params()[u"comment"_s].trimmed(); applyToTorrents(hashes, [&comment](BitTorrent::Torrent *const torrent) {