empty lines can't be send any longer

This commit is contained in:
Torsten Schulz
2024-02-15 14:57:19 +01:00
parent bd423fdd0d
commit 8020d49f9f

View File

@@ -526,7 +526,10 @@ Wt::WPushButton* App::createSendButton(Wt::WHBoxLayout* inputLayout, Wt::WLineEd
}
void App::sendMessage(Wt::WLineEdit *inputLine) {
auto utf8String = inputLine->valueText().toUTF8();
auto utf8String = inputLine->valueText().trim().toUTF8();
if (utf8String == "") {
return;
}
size_t pos = 0;
while ((pos = utf8String.find("<", pos)) != std::string::npos) {
utf8String.replace(pos, 1, "&lt;");