Skip to content

Commit 3ecc2a4

Browse files
authored
Url encode asset lookup key (flutter#15171)
1 parent 545c292 commit 3ecc2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/flutter/lib/src/services/asset_bundle.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ abstract class CachingAssetBundle extends AssetBundle {
223223
class PlatformAssetBundle extends CachingAssetBundle {
224224
@override
225225
Future<ByteData> load(String key) async {
226-
final Uint8List encoded = UTF8.encoder.convert(key);
226+
final Uint8List encoded = UTF8.encoder.convert(new Uri(path: key).path);
227227
final ByteData asset =
228228
await BinaryMessages.send('flutter/assets', encoded.buffer.asByteData());
229229
if (asset == null)

0 commit comments

Comments
 (0)