From 4e69ce9dc9f74f3bfc8de555daf379f0d383afa6 Mon Sep 17 00:00:00 2001 From: TimothyAlexisVass <55708319+TimothyAlexisVass@users.noreply.github.com> Date: Wed, 29 May 2024 15:40:13 +0200 Subject: [PATCH] Allow IDN This allows International Domain Names. --- lib/validate_url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validate_url.rb b/lib/validate_url.rb index d77272c..1fc81c3 100644 --- a/lib/validate_url.rb +++ b/lib/validate_url.rb @@ -50,7 +50,7 @@ def filtered_options(value) end def validate_url(record, attribute, value, schemes) - uri = URI.parse(value) + uri = URI.parse(URI::Parser.new.escape(value) host = uri && uri.host scheme = uri && uri.scheme