Skip to content

Commit

Permalink
Merge pull request #268 from wtrocki/CB-14048
Browse files Browse the repository at this point in the history
CB-14048: (android) allowedSchemes check empty string fix
  • Loading branch information
jcesarmobile authored May 19, 2018
2 parents 5581957 + 57eda78 commit 33aff11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,10 @@ else if (url.startsWith("sms:")) {
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
if (allowedSchemes == null) {
String allowed = preferences.getString("AllowedSchemes", "");
allowedSchemes = allowed.split(",");
String allowed = preferences.getString("AllowedSchemes", null);
if(allowed != null) {
allowedSchemes = allowed.split(",");
}
}
if (allowedSchemes != null) {
for (String scheme : allowedSchemes) {
Expand Down

0 comments on commit 33aff11

Please sign in to comment.