New issue
Advanced search Search tips

Issue 902223 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

loadDataWithBaseURL doesn't respect encoding parameter

Project Member Reported by ntfschr@chromium.org, Nov 6

Issue description

Apparently loadDataWithBaseURL has ~never respected the encoding parameter. Whenever the baseUrl is not data scheme, the API requires non-encoded content to be passed as the data parameter.

This is very surprising, and we should probably improve documentation to clarify this, as well as clean up some chromium code which assumes this does accept encoded data.
 
We might want to consider just fixing this; I'm not sure what effect that might have on existing apps.

Also, relatedly: it might actually be nice if there just was an encoding value you could specify that *did* just take the data literally, for loadData as well..
Hm, now that I've seen the code it looks like it might be more disruptive to change it, and there's not a great advantage to having a parameter to take the data literally because all the code does is base64 encode it anyway, the caller should just do it :|
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eba51657546e1c4d84d3d13b60503ab14d523c6d

commit eba51657546e1c4d84d3d13b60503ab14d523c6d
Author: Nate Fischer <ntfschr@chromium.org>
Date: Wed Nov 07 00:54:53 2018

AW: fix bug when measuring '#' in data URIs

loadDataWithBaseURL doesn't always accept encoded content. This moves
the histogram code into the branch which actually accepts encoded
content (since it's reasonable to expect an unencoded '#' in unencoded
content).

R=smcgruer@chromium.org, torne@chromium.org

Bug: 902223
Bug: 823666
Test: None
Change-Id: If5c912640ea81a4d6e333496233958f3323d9bd6
Reviewed-on: https://chromium-review.googlesource.com/c/1319347
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605887}
[modify] https://crrev.com/eba51657546e1c4d84d3d13b60503ab14d523c6d/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/eba51657546e1c4d84d3d13b60503ab14d523c6d/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java

Sign in to add a comment