diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-30 23:24:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-01 02:08:06 +0100 |
| commit | 03ba29cac931e5160e93ed0b7ed3c6bbd50335ea (patch) | |
| tree | 38cad354c3296b08fc1072c71d3529a8a6cf693c /src/lib/util.cc | |
| parent | 085943d11efb3916af8f2f50d625d39f7074e526 (diff) | |
Make the allowed list a defaulted parameter of careful_string_filter().
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 30a82ee50..fde4ce15e 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -783,7 +783,7 @@ atmos_asset_filename (shared_ptr<dcp::AtmosAsset> asset, int reel_index, int ree string -careful_string_filter (string s) +careful_string_filter(string s, wstring allowed) { /* Filter out `bad' characters which `may' cause problems with some systems (either for DCP name or filename). * I don't know of a list of what really is allowed, so this is a guess. @@ -813,7 +813,6 @@ careful_string_filter (string s) /* Then remove anything that's not in a very limited character set */ wstring out; - wstring const allowed = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.+"; for (int i = 0; i < transliterated_more.length(); ++i) { wchar_t c = transliterated_more[i]; if (allowed.find(c) != string::npos) { |
