Escape quotes in the subtitle path (#12690)

pull/12695/head
Dmitry Lyzo 4 months ago committed by GitHub
parent aed00733f8
commit 8a456bf895
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1104,7 +1104,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
// https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping // https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
// We need to double escape // We need to double escape
return path.Replace('\\', '/').Replace(":", "\\:", StringComparison.Ordinal).Replace("'", @"'\\\''", StringComparison.Ordinal); return path
.Replace('\\', '/')
.Replace(":", "\\:", StringComparison.Ordinal)
.Replace("'", @"'\\\''", StringComparison.Ordinal)
.Replace("\"", "\\\"", StringComparison.Ordinal);
} }
/// <inheritdoc /> /// <inheritdoc />

Loading…
Cancel
Save