Browse Source

feature: Added CultureInvariant RegexOption to WebhookUrlRegex (#1637)

Co-authored-by: Jake Mathews <jwm5vv@virginia.edu>
tags/2.3.0
mathewsjwh GitHub 4 years ago
parent
commit
e3925a77a3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Webhook/DiscordWebhookClient.cs

+ 1
- 1
src/Discord.Net.Webhook/DiscordWebhookClient.cs View File

@@ -33,7 +33,7 @@ namespace Discord.Webhook
: this(webhookUrl, new DiscordRestConfig()) { }

// regex pattern to match webhook urls
private static Regex WebhookUrlRegex = new Regex(@"^.*(discord|discordapp)\.com\/api\/webhooks\/([\d]+)\/([a-z0-9_-]+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static Regex WebhookUrlRegex = new Regex(@"^.*(discord|discordapp)\.com\/api\/webhooks\/([\d]+)\/([a-z0-9_-]+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);

/// <summary> Creates a new Webhook Discord client. </summary>
public DiscordWebhookClient(ulong webhookId, string webhookToken, DiscordRestConfig config)


Loading…
Cancel
Save