am 68e53004: The local loaders assume the url given to them is decoded.
Merge commit '68e530047786b4f9d219d17652d7429e6e5a21bd' * commit '68e530047786b4f9d219d17652d7429e6e5a21bd': The local loaders assume the url given to them is decoded.
This commit is contained in:
@@ -128,6 +128,18 @@ class FrameLoader {
|
||||
/* package */
|
||||
static boolean handleLocalFile(String url, LoadListener loadListener,
|
||||
WebSettings settings) {
|
||||
// Attempt to decode the percent-encoded url before passing to the
|
||||
// local loaders.
|
||||
try {
|
||||
url = new String(URLUtil.decode(url.getBytes()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
loadListener.error(EventHandler.ERROR_BAD_URL,
|
||||
loadListener.getContext().getString(
|
||||
com.android.internal.R.string.httpErrorBadUrl));
|
||||
// Return true here so we do not trigger an unsupported scheme
|
||||
// error.
|
||||
return true;
|
||||
}
|
||||
if (URLUtil.isAssetUrl(url)) {
|
||||
FileLoader.requestUrl(url, loadListener, loadListener.getContext(),
|
||||
true, settings.getAllowFileAccess());
|
||||
|
||||
Reference in New Issue
Block a user