diff --git a/src/ui/login-form-ui-handler.ts b/src/ui/login-form-ui-handler.ts index 27de954632f..f77efcad260 100644 --- a/src/ui/login-form-ui-handler.ts +++ b/src/ui/login-form-ui-handler.ts @@ -59,7 +59,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler { }; if (!this.inputs[0].text) return onFail(i18next.t('menu:emptyUsername')); - Utils.apiPost(`account/login`, `username=${this.inputs[0].text}&password=${this.inputs[1].text}`, 'application/x-www-form-urlencoded') + Utils.apiPost(`account/login`, `username=${encodeURIComponent(this.inputs[0].text)}&password=${encodeURIComponent(this.inputs[1].text)}`, 'application/x-www-form-urlencoded') .then(response => { if (!response.ok) return response.text();