Skip to content

Commit

Permalink
Closes mozilla-mobile#783: Allow pages to load about:blank.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcomella committed Jun 15, 2017
1 parent e86bb06 commit 8cf4835
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
return true;
}

// Allow pages to blank themselves by loading about:blank. While it's a little incorrect to let pages
// access our internal URLs, Chrome allows loads to about:blank and, to ensure our behavior conforms
// to the behavior that most of the web is developed against, we do too.
if (url.equals("about:blank")) {
return false;
}

// shouldOverrideUrlLoading() is called for both the main frame, and iframes.
// That can get problematic if an iframe tries to load an unsupported URL.
// We then try to either handle that URL (ask to open relevant app), or extract
Expand Down

0 comments on commit 8cf4835

Please sign in to comment.