1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

Clean RSS feed before detecting type (#1014)

This commit is contained in:
Mitchell Cash
2017-03-05 17:48:48 +10:00
committed by Devin Buhl
parent 0aa6066a6f
commit 7433e89467
8 changed files with 368 additions and 18 deletions
+2 -15
View File
@@ -77,8 +77,8 @@ namespace NzbDrone.Core.Indexers
{
try
{
var content = indexerResponse.Content;
content = ReplaceEntities.Replace(content, ReplaceEntity);
var content = XmlCleaner.ReplaceEntities(indexerResponse.Content);
content = XmlCleaner.ReplaceUnicode(content);
using (var xmlTextReader = XmlReader.Create(new StringReader(content), new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, IgnoreComments = true }))
{
@@ -97,19 +97,6 @@ namespace NzbDrone.Core.Indexers
}
}
protected virtual string ReplaceEntity(Match match)
{
try
{
var character = WebUtility.HtmlDecode(match.Value);
return string.Concat("&#", (int)character[0], ";");
}
catch
{
return match.Value;
}
}
protected virtual ReleaseInfo CreateNewReleaseInfo()
{
return new ReleaseInfo();