mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Escape quotes in the subtitle path (#12690)
This commit is contained in:
parent
aed00733f8
commit
8a456bf895
@ -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…
x
Reference in New Issue
Block a user