summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-09-07 23:24:06 +0200
committerCarl Hetherington <cth@carlh.net>2023-09-07 23:24:08 +0200
commit77df016da7f8e1ee3f31c2a0d147c939e78add97 (patch)
tree3fee8b0c893858dc86afdbe7cf1163c97d325057 /src/lib
parent5a1966c187c189da43a650f1425b29190f5cfe78 (diff)
Sanitise asset names after potentially failed %-based substitutions (#945).
If there's a %x in the format string, where %x is not recognised, we should at least remove the %.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 6339cb6a6..1ce288686 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -733,9 +733,9 @@ asset_filename (shared_ptr<dcp::Asset> asset, string type, int reel_index, int r
values['r'] = raw_convert<string>(reel_index + 1);
values['n'] = raw_convert<string>(reel_count);
if (summary) {
- values['c'] = careful_string_filter(summary.get());
+ values['c'] = summary.get();
}
- return Config::instance()->dcp_asset_filename_format().get(values, "_" + asset->id() + extension);
+ return careful_string_filter(Config::instance()->dcp_asset_filename_format().get(values, "_" + asset->id() + extension));
}