Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6327ef8b authored by Patrick Scott's avatar Patrick Scott Committed by Android Git Automerger
Browse files

am 68e53004: The local loaders assume the url given to them is decoded.

Merge commit '68e53004'

* commit '68e53004':
  The local loaders assume the url given to them is decoded.
parents d8a7fe45 68e53004
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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());