In file AppBrowser.java: New code within shouldOverrideUrlLoading() to

check for whitelisting custom schemes via a new "AllowedSchemes"
preference configuration item.  Allows custom schemes like
"mycoolapp://" or "wevotetwitterscheme://"

In file inappbrowser.js: Added new "customscheme" channel.
This commit is contained in:
stevepodell 2018-04-05 11:54:32 -07:00
parent 4c4bee528e
commit 27500c2990

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-z]*://.*?$")) {
if (allowedSchemes == null) {
String allowed = preferences.getString("AllowedSchemes", "");
allowedSchemes = allowed.split(",");