Skip to content

Commit f57ede9

Browse files
committed
CB-14061: (android) comply with RFC 3986 for custom URL scheme handling
1 parent 5581957 commit f57ede9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/InAppBrowser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ else if (url.startsWith("sms:")) {
11121112
}
11131113
}
11141114
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
1115-
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
1115+
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[A-Za-z0-9+.-]*://.*?$")) {
11161116
if (allowedSchemes == null) {
11171117
String allowed = preferences.getString("AllowedSchemes", "");
11181118
allowedSchemes = allowed.split(",");

0 commit comments

Comments
 (0)