diff --git a/static/js/main.js b/static/js/main.js index b7a3b2f..3d24475 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -31,8 +31,8 @@ function show_page(id, historyPush) { $("#login-button").click(function (e) { var data = JSON.stringify({ - user: $("#login").val(), - password: $("#password").val() + user: $("#login").val().trim(), + password: $("#password").val().trim() }); $("#password").val(''); $.ajax({ @@ -80,8 +80,8 @@ $("#login-button").click(function (e) { $("#register-button").click(function (e) { var data = JSON.stringify({ - user: $("#register-user").val(), - password: $("#register-password").val() + user: $("#register-user").val().trim(), + password: $("#register-password").val().trim() }); if( $("#register-password-confirm").val() != $("#register-password").val()) { t = new TypeIt('#error-message-register', {