diff --git a/OF DL/Helpers/FileNameHelper.cs b/OF DL/Helpers/FileNameHelper.cs index 0b620de..2d5a3a9 100644 --- a/OF DL/Helpers/FileNameHelper.cs +++ b/OF DL/Helpers/FileNameHelper.cs @@ -1,3 +1,4 @@ +using HtmlAgilityPack; using OF_DL.Entities; using System; using System.Collections.Generic; @@ -130,7 +131,9 @@ public async Task> GetFilename(object obj1, object ob object propertyValue = property.GetValue(obj1); if (propertyValue != null) { - var str = propertyValue.ToString(); + var pageDoc = new HtmlDocument(); + pageDoc.LoadHtml(propertyValue.ToString()); + var str = pageDoc.DocumentNode.InnerText; if (str.Length > 100) // todo: add length limit to config str = str.Substring(0, 100); values.Add(propertyName, str);