From a8faf7622768ce9d4e41d557a4a4a07e809fe75c Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Thu, 12 Dec 2019 00:06:42 +0800 Subject: [PATCH] fix(gitlab): encode path --- lib/screens/gitlab_blob.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/screens/gitlab_blob.dart b/lib/screens/gitlab_blob.dart index 595a331..aa8fcbe 100644 --- a/lib/screens/gitlab_blob.dart +++ b/lib/screens/gitlab_blob.dart @@ -19,8 +19,9 @@ class GitlabBlobScreen extends StatelessWidget { return RefreshStatefulScaffold( title: AppBarTitle(path), fetchData: () async { + final encodedPath = Uri.encodeComponent(path); final res = await Provider.of(context).fetchGitlab( - '/projects/$id/repository/files/$path?ref=master'); // TODO: + '/projects/$id/repository/files/$encodedPath?ref=master'); // TODO: return GitlabBlob.fromJson(res); }, bodyBuilder: (data, _) {