mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
Merge pull request #15909 from luiscuenca/WLtrimSpaces
BUGZ-656: Trim spaces for orgname and username fields on Windows Launcher
This commit is contained in:
commit
2dfc03ea47
1 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <regex>
|
||||
#include "LauncherApp.h"
|
||||
#include "LauncherDlg.h"
|
||||
|
||||
|
@ -268,7 +269,10 @@ afx_msg void CLauncherDlg::OnNextClicked() {
|
|||
m_orgname.GetWindowTextW(orgname);
|
||||
m_username.GetWindowTextW(username);
|
||||
m_password.GetWindowTextW(password);
|
||||
|
||||
// trim spaces
|
||||
orgname = CString(std::regex_replace(LauncherUtils::cStringToStd(orgname), std::regex("^ +| +$|( ) +"), "$1").c_str());
|
||||
username = CString(std::regex_replace(LauncherUtils::cStringToStd(username), std::regex("^ +| +$|( ) +"), "$1").c_str());
|
||||
// encode
|
||||
username = LauncherUtils::urlEncodeString(username);
|
||||
password = LauncherUtils::urlEncodeString(password);
|
||||
LauncherUtils::ResponseError error;
|
||||
|
|
Loading…
Reference in a new issue