remove CDATA and html tags
This commit is contained in:
parent
a16655e22e
commit
3c71f466e9
|
@ -1,5 +1,6 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
|
@ -145,7 +146,14 @@ namespace MediaBrowser.Controller.Providers
|
||||||
|
|
||||||
case "Overview":
|
case "Overview":
|
||||||
case "Description":
|
case "Description":
|
||||||
item.Overview = reader.ReadInnerXml();
|
var overview = reader.ReadInnerXml();
|
||||||
|
const string cdataRegex = @"\<\!\[CDATA\[(?<text>.*)\]\]\>";
|
||||||
|
if (Regex.IsMatch(overview, cdataRegex))
|
||||||
|
{
|
||||||
|
var match = Regex.Match(overview, cdataRegex);
|
||||||
|
overview = match.Groups["text"].Value;
|
||||||
|
}
|
||||||
|
item.Overview = Regex.Replace(overview, @"\<[^\>]*\>", string.Empty);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "TagLine":
|
case "TagLine":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user