From de7b09bfbd1fee94b6746850d1f10d215dd2f96a Mon Sep 17 00:00:00 2001 From: valdis iljuconoks Date: Wed, 20 Sep 2023 19:13:42 +0300 Subject: [PATCH] Added additional symbols for embedded ID filter --- .../Providers/YouTubeVideoResponseFormatter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Geta.OEmbed.Client/Providers/YouTubeVideoResponseFormatter.cs b/src/Geta.OEmbed.Client/Providers/YouTubeVideoResponseFormatter.cs index 1b13d6e..37445bf 100644 --- a/src/Geta.OEmbed.Client/Providers/YouTubeVideoResponseFormatter.cs +++ b/src/Geta.OEmbed.Client/Providers/YouTubeVideoResponseFormatter.cs @@ -10,7 +10,7 @@ namespace Geta.OEmbed.Client.Providers public class YouTubeVideoResponseFormatter : IProviderResponseFormatter { private static readonly Regex SrcFilter = new("src=\"([a-z-0-9-_?=/:.]{1,})\"", RegexOptions.IgnoreCase | RegexOptions.Compiled, TimeSpan.FromSeconds(1)); - private static readonly Regex IdFilter = new("/embed/([a-z0-9]+)", RegexOptions.IgnoreCase | RegexOptions.Compiled, TimeSpan.FromSeconds(1)); + private static readonly Regex IdFilter = new("/embed/([a-z0-9-_]+)", RegexOptions.IgnoreCase | RegexOptions.Compiled, TimeSpan.FromSeconds(1)); public virtual bool CanFormat(IOEmbedProvider oEmbedProvider, OEmbedResponse oEmbedResponse) {