aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index ad96cebcd..72fc9ad52 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -936,7 +936,8 @@ class YoutubeDL(object):
# If value is an object, sanitize might convert it to a string
# So we convert it to repr first
value, fmt = repr(value), '%ss' % fmt[:-1]
- value = sanitize(key, value)
+ if fmt[-1] in 'csr':
+ value = sanitize(key, value)
tmpl_dict[key] = value
return '%({key}){fmt}'.format(key=key, fmt=fmt)