diff --git a/app/src/main/java/tk/therealsuji/vtopchennai/services/VTOPService.java b/app/src/main/java/tk/therealsuji/vtopchennai/services/VTOPService.java index 743000d..ae62e6a 100644 --- a/app/src/main/java/tk/therealsuji/vtopchennai/services/VTOPService.java +++ b/app/src/main/java/tk/therealsuji/vtopchennai/services/VTOPService.java @@ -489,11 +489,10 @@ public void signIn(final String captcha) { webView.evaluateJavascript("(function() {" + "if (typeof captchaInterval != 'undefined') clearInterval(captchaInterval);" + "if (typeof executeInterval != 'undefined') clearInterval(executeInterval);" + - "var credentials = 'uname=" + username + "&passwd=' + encodeURIComponent('" + password + "') + '&" + captcha + "';" + - "$('#vtopLoginForm [name=\"username\"]').val('" + username + "');" + - "$('#vtopLoginForm [name=\"password\"]').val('" + password + "');" + - "$('#vtopLoginForm [name=\"captchaStr\"]').val('" + captcha + "');" + - "$('#vtopLoginForm [name=\"gResponse\"]').val('" + captcha + "');" + + "$('#vtopLoginForm [name=\"username\"]').val('" + username.replaceAll("'", "\\\\'") + "');" + + "$('#vtopLoginForm [name=\"password\"]').val('" + password.replaceAll("'", "\\\\'") + "');" + + "$('#vtopLoginForm [name=\"captchaStr\"]').val('" + captcha.replaceAll("'", "\\\\'") + "');" + + "$('#vtopLoginForm [name=\"gResponse\"]').val('" + captcha.replaceAll("'", "\\\\'") + "');" + "var response = {" + " authorised: false," + " error_message: null," +