Skip to content

Commit

Permalink
Fixed: Users can check invalid URLs (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed May 15, 2022
1 parent 9828dde commit 6d1d741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion InternetTest/InternetTest/Pages/DownDetectorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private void MultipleWebsitesBtn_Click(object sender, RoutedEventArgs e)

private void AddBtn_Click(object sender, RoutedEventArgs e)
{
if (!string.IsNullOrEmpty(WebsiteTextBox.Text))
if (!string.IsNullOrEmpty(WebsiteTextBox.Text) && WebsiteTextBox.Text.Split(new string[] { "." }, StringSplitOptions.None).Length >= 2)
{
WebsiteItemPanel.Children.Add(new WebsiteItem(FormatURL(WebsiteTextBox.Text))); // Add website item
WebsiteTextBox.Text = ""; // Empty
Expand Down

0 comments on commit 6d1d741

Please sign in to comment.