Skip to content

Commit

Permalink
fix(android): javascript injection not working on urls with query (#7545
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jcesarmobile authored Jul 16, 2024
1 parent 0dca917 commit 57ce5c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void loadWebView() {
JSInjector injector = getJSInjector();
if (WebViewFeature.isFeatureSupported(WebViewFeature.DOCUMENT_START_SCRIPT)) {
String allowedOrigin = appUrl;
Uri appUri = Uri.parse(appUrl);
Uri appUri = Uri.parse(appUrl).buildUpon().clearQuery().build();
if (appUri.getPath() != null) {
if (appUri.getPath().equals("/")) {
allowedOrigin = appUrl.substring(0, appUrl.length() - 1);
Expand Down

0 comments on commit 57ce5c6

Please sign in to comment.