1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 09:49:00 +00:00

Fixed: Error in unicode cleanup code removing most non-latin characters instead of just invalid ones. (#3383)

This commit is contained in:
Qstick 2019-02-24 12:08:28 -05:00 committed by Leonardo Galli
parent 5cb5faa8a3
commit 6cf257ac01

View file

@ -8,7 +8,7 @@ public static class XmlCleaner
{
private static readonly Regex ReplaceEntitiesRegex = new Regex("&[a-z]+;", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ReplaceUnicodeRegex = new Regex(@"[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000-x10FFFF]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ReplaceUnicodeRegex = new Regex(@"[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static string ReplaceEntities(string content)
{