don't remove line breaks in setCommentAction()

This commit is contained in:
HamletDuFromage 2025-07-28 13:10:49 +02:00
commit 54a8553f67

View file

@ -2149,8 +2149,7 @@ void TorrentsController::setCommentAction()
requireParams({u"hashes"_s, u"comment"_s}); requireParams({u"hashes"_s, u"comment"_s});
const QStringList hashes {params()[u"hashes"_s].split(u'|')}; const QStringList hashes {params()[u"hashes"_s].split(u'|')};
const QString comment = params()[u"comment"_s].trimmed() const QString comment = params()[u"comment"_s].trimmed();
.replace(QRegularExpression(u"\r?\n"_s), u" "_s);
applyToTorrents(hashes, [&comment](BitTorrent::Torrent *const torrent) applyToTorrents(hashes, [&comment](BitTorrent::Torrent *const torrent)
{ {