Don't depend on protocol in video regex
This commit is contained in:
@@ -111,7 +111,7 @@ namespace ReadSharp.Ports.NReadability
|
||||
private static readonly Regex _BreakBeforeParagraphRegex = new Regex("<br[^>]*>\\s*<p");
|
||||
private static readonly Regex _NormalizeSpacesRegex = new Regex("\\s{2,}");
|
||||
private static readonly Regex _KillBreaksRegex = new Regex("(<br\\s*\\/?>(\\s| ?)*){1,}");
|
||||
private static readonly Regex _VideoRegex = new Regex("http:\\/\\/(www\\.)?(youtube|vimeo)\\.com", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex _VideoRegex = new Regex("\\/\\/(www\\.)?(youtube|vimeo)\\.com", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex _ReplaceDoubleBrsRegex = new Regex("(<br[^>]*>[ \\n\\r\\t]*){2,}", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex _ReplaceFontsRegex = new Regex("<(\\/?)font[^>]*>", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex _ArticleTitleDashRegex1 = new Regex(" [\\|\\-] ");
|
||||
@@ -1435,6 +1435,8 @@ namespace ReadSharp.Ports.NReadability
|
||||
|
||||
var elementsToRemove = new List<XElement>();
|
||||
|
||||
// TODO: proof iframe videos
|
||||
|
||||
foreach (XElement element in elements)
|
||||
{
|
||||
/* Allow youtube and vimeo videos through as people usually want to see those. */
|
||||
|
||||
Reference in New Issue
Block a user