Skip to content

Instantly share code, notes, and snippets.

@codelahoma
Created August 18, 2015 19:55
Show Gist options
  • Save codelahoma/e753049a1e8bca5fd982 to your computer and use it in GitHub Desktop.
Save codelahoma/e753049a1e8bca5fd982 to your computer and use it in GitHub Desktop.
@@ -50,7 +50,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import org.apache.cordova.CallbackContext;
-import org.apache.cordova.Config;
+import org.apache.cordova.Whitelist;
import org.apache.cordova.CordovaArgs;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
@@ -143,6 +143,7 @@ public class InAppBrowser extends CordovaPlugin {
}
final String target = t;
final HashMap<String, Boolean> features = parseFeature(args.optString(2));
+ final Whitelist whiteList = new Whitelist();
Log.d(LOG_TAG, "target = " + target);
@@ -155,7 +156,7 @@ public class InAppBrowser extends CordovaPlugin {
Log.d(LOG_TAG, "in self");
// load in webview
if (url.startsWith("file://") || url.startsWith("javascript:")
- || Config.isUrlWhiteListed(url)) {
+ || whiteList.isUrlWhiteListed(url)) {
Log.d(LOG_TAG, "loading in webview");
webView.loadUrl(url);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment