mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Add about:blank and data: to default shouldAllowNavigation()
This commit is contained in:
parent
a6da46a00e
commit
eccf486162
@ -325,8 +325,10 @@ public class PluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Default policy:
|
// Default policy:
|
||||||
// Internal urls on file:// or data:// that do not contain "/app_webview/" are allowed for navigation
|
if (url.startsWith("data:") || url.startsWith("about:blank")) {
|
||||||
if (url.startsWith("file://") || url.startsWith("data:")) {
|
return true;
|
||||||
|
}
|
||||||
|
if (url.startsWith("file://")) {
|
||||||
//This directory on WebKit/Blink based webviews contains SQLite databases!
|
//This directory on WebKit/Blink based webviews contains SQLite databases!
|
||||||
//DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
|
//DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
|
||||||
return !url.contains("/app_webview/");
|
return !url.contains("/app_webview/");
|
||||||
@ -362,7 +364,7 @@ public class PluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Default policy:
|
// Default policy:
|
||||||
return url.startsWith("file://");
|
return url.startsWith("file://") || url.startsWith("about:blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user