mirror of
https://github.com/apache/cordova-android.git
synced 2026-02-21 00:02:46 +08:00
Fix data URI decoding in CordovaResourceApi
It was not URI-decoding first, and so was broken for non-base64-encoded
URIs.
(cherry picked from commit 4e1aa8aa59)
This commit is contained in:
@@ -315,7 +315,7 @@ public class CordovaResourceApi {
|
||||
}
|
||||
|
||||
private OpenForReadResult readDataUri(Uri uri) {
|
||||
String uriAsString = uri.toString().substring(5);
|
||||
String uriAsString = uri.getSchemeSpecificPart();
|
||||
int commaPos = uriAsString.indexOf(',');
|
||||
if (commaPos == -1) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user