Skip to content

Commit 27f3e32

Browse files
author
Steve Block
committed
Clarify JavaDoc for WebView.loadData()
Bug: 5461416 Change-Id: I3f0955677ea64bb4073c97aabea34096298cd710
1 parent 58de142 commit 27f3e32

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/java/android/webkit/WebView.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,11 +801,13 @@ public void postUrl(String url, byte[] postData) {
801801
* #loadDataWithBaseURL(String,String,String,String,String)
802802
* loadDataWithBaseURL()} with an appropriate base URL.
803803
* <p>
804-
* If the value of the encoding parameter is 'base64', then the data must
805-
* be encoded as base64. Otherwise, the data must use ASCII encoding for
804+
* The encoding parameter specifies whether the data is base64 or URL
805+
* encoded. If the data is base64 encoded, the value of the encoding
806+
* parameter must be 'base64'. For all other values of the parameter,
807+
* including null, it is assumed that the data uses ASCII encoding for
806808
* octets inside the range of safe URL characters and use the standard %xx
807-
* hex encoding of URLs for octets outside that range. For example,
808-
* '#', '%', '\', '?' should be replaced by %23, %25, %27, %3f respectively.
809+
* hex encoding of URLs for octets outside that range. For example, '#',
810+
* '%', '\', '?' should be replaced by %23, %25, %27, %3f respectively.
809811
* <p>
810812
* The 'data' scheme URL formed by this method uses the default US-ASCII
811813
* charset. If you need need to set a different charset, you should form a

0 commit comments

Comments
 (0)