Skip to content

Commit

Permalink
Sanitize line feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Sep 21, 2023
1 parent 4f41d6e commit cd9c87f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TwitchDownloaderCore/Tools/FfmpegMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private static string SanitizeKeyValue(string str)
return str;
}

if (str.AsSpan().IndexOfAny(@"=;#\") == -1)
if (str.AsSpan().IndexOfAny(@$"=;#\{LINE_FEED}") == -1)
{
return str;
}
Expand All @@ -88,6 +88,7 @@ private static string SanitizeKeyValue(string str)
.Replace(";", @"\;")
.Replace("#", @"\#")
.Replace(@"\", @"\\")
.Replace(LINE_FEED, $@"\{LINE_FEED}")
.ToString();
}
}
Expand Down

0 comments on commit cd9c87f

Please sign in to comment.