Skip to content

Commit 57eda78

Browse files
committed
CB-14048: (android) allowedSchemes check empty string fix
1 parent 5581957 commit 57eda78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/android/InAppBrowser.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,10 @@ else if (url.startsWith("sms:")) {
11141114
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
11151115
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
11161116
if (allowedSchemes == null) {
1117-
String allowed = preferences.getString("AllowedSchemes", "");
1118-
allowedSchemes = allowed.split(",");
1117+
String allowed = preferences.getString("AllowedSchemes", null);
1118+
if(allowed != null) {
1119+
allowedSchemes = allowed.split(",");
1120+
}
11191121
}
11201122
if (allowedSchemes != null) {
11211123
for (String scheme : allowedSchemes) {

0 commit comments

Comments
 (0)