From a7e102ffc726d00df369560ec9a7f742f9d387bb Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 26 Sep 2023 21:02:49 +0600 Subject: [PATCH] fix: valid non-ASCII characters get removed from downloaded file name #745 --- lib/utils/primitive_utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/primitive_utils.dart b/lib/utils/primitive_utils.dart index 3843601e4..801c2e5ae 100644 --- a/lib/utils/primitive_utils.dart +++ b/lib/utils/primitive_utils.dart @@ -48,6 +48,6 @@ abstract class PrimitiveUtils { } static String toSafeFileName(String str) { - return str.replaceAll(RegExp(r'[^\w\s\.\-_]'), "_"); + return str.replaceAll(RegExp(r'[/\?%*:|"<>]'), ' '); } }