Merge pull request #269 from timbru31/fix/CB-14061-handle-more-url-schemes

CB-14061: (android) comply with RFC 3986 for custom URL scheme handling
This commit is contained in:
jcesarmobile 2018-05-19 13:57:13 +02:00 committed by GitHub
commit 26cf6e488c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1112,7 +1112,7 @@ public class InAppBrowser extends CordovaPlugin {
}
}
// 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]*://.*?$")) {
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[A-Za-z0-9+.-]*://.*?$")) {
if (allowedSchemes == null) {
String allowed = preferences.getString("AllowedSchemes", null);
if(allowed != null) {