mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +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:
|
||||
// Internal urls on file:// or data:// that do not contain "/app_webview/" are allowed for navigation
|
||||
if (url.startsWith("file://") || url.startsWith("data:")) {
|
||||
if (url.startsWith("data:") || url.startsWith("about:blank")) {
|
||||
return true;
|
||||
}
|
||||
if (url.startsWith("file://")) {
|
||||
//This directory on WebKit/Blink based webviews contains SQLite databases!
|
||||
//DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
|
||||
return !url.contains("/app_webview/");
|
||||
@ -362,7 +364,7 @@ public class PluginManager {
|
||||
}
|
||||
|
||||
// Default policy:
|
||||
return url.startsWith("file://");
|
||||
return url.startsWith("file://") || url.startsWith("about:blank");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user