diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 7eec41e00..ef64f525e 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -2154,8 +2154,8 @@ void TorrentsController::setCommentAction() if (!torrent) throw APIError(APIErrorType::NotFound); - QString comment = params()[u"comment"_s].trimmed(); - comment.replace(QRegularExpression(u"\r?\n"_s), u" "_s); + QString comment = params()[u"comment"_s].trimmed() + .replace(QRegularExpression(u"\r?\n"_s), u" "_s); torrent->setComment(comment); setResult(QString());