Javascript is not getting executed when the below code is loaded in Android WebView.
Issue is seen only when the input box with a value of ✓ is being included in the html. Refer the text input field in the code given below with the name "utf8".
This input and its value is returned by a payment gateway provider, It's part of their form data, which needs to be submitted to their domain url to complete the payment. Hence the value and the html cannot be altered.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action=“” accept-charset=“UTF-8” method=“post”>
<input name=“utf8” type=“hidden” value=“✓” />
</form>
<script>
alert("hello world");
</script>
</body>
</html>
Issue is seen on :
- Samsung Galaxy S7, Android version 8.0.0
- One Plus 5, Android version 9
Working perfectly on:
- Motog 5s Plus, Android version 8.1.0
- Samsung J2, Android version 5.1.1