From 8dac5c95eb546faec55773b40ed1213ae93b67b1 Mon Sep 17 00:00:00 2001 From: soh_cah_toa Date: Mon, 28 Apr 2014 22:21:39 -0400 Subject: [PATCH] Fixed #is_valid_domain? regex to include appended dot. --- core/filters/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/filters/base.rb b/core/filters/base.rb index 3ad37f771..33c5a5b73 100644 --- a/core/filters/base.rb +++ b/core/filters/base.rb @@ -149,7 +149,7 @@ module Filters # TLD's is not static. def self.is_valid_domain?(domain) return false unless is_non_empty_string?(domain) - return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,})$/i + return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,}).?$/i false end