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 :
Working perfectly on:
The solution for me was to replace # with %23.
From Chrome 72 update webview treats the # as the end of content: https://www.chromestatus.com/feature/5656049583390720
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With