{
string unfiltered;
if (use_isdcf_name()) {
- unfiltered = isdcf_name (if_created_now);
- } else {
- unfiltered = name ();
- }
-
- /* Filter out `bad' characters which cause problems with some systems.
- There's no apparent list of what really is allowed, so this is a guess.
- */
-
- string filtered;
- string const allowed = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
- for (size_t i = 0; i < unfiltered.size(); ++i) {
- if (allowed.find (unfiltered[i]) != string::npos) {
- filtered += unfiltered[i];
- }
+ return careful_string_filter (isdcf_name (if_created_now));
}
- return filtered;
+ return careful_string_filter (name ());
}
void