fix: valid non-ASCII characters get removed from downloaded file name #745

This commit is contained in:
Kingkor Roy Tirtho 2023-09-26 21:02:49 +06:00
parent ae2745fdb7
commit a7e102ffc7

View File

@ -48,6 +48,6 @@ abstract class PrimitiveUtils {
} }
static String toSafeFileName(String str) { static String toSafeFileName(String str) {
return str.replaceAll(RegExp(r'[^\w\s\.\-_]'), "_"); return str.replaceAll(RegExp(r'[/\?%*:|"<>]'), ' ');
} }
} }