mu: improve filename escaping
Sanitize attachment-names by replacing all control characters, '/' and ':'' by '-', but leave spaces alone.
This commit is contained in:
@ -244,9 +244,9 @@ cleanup_filename (char *fname)
|
||||
{
|
||||
gchar *cur;
|
||||
|
||||
/* remove slashes, spaces, colons... */
|
||||
/* replace control characters, slashes,colons by a '-' */
|
||||
for (cur = fname; *cur; ++cur)
|
||||
if (*cur == '/' || *cur == ' ' || *cur == ':')
|
||||
if (*cur < ' ' || *cur == '/' || *cur == ':')
|
||||
*cur = '-';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user