mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: store the topic links using the cooked upload url
This commit is contained in:
@ -5,7 +5,7 @@ class UrlValidator < ActiveModel::EachValidator
|
||||
begin
|
||||
uri = URI.parse(value)
|
||||
uri.is_a?(URI::HTTP) && !uri.host.nil? && uri.host.include?(".")
|
||||
rescue URI::InvalidURIError => e
|
||||
rescue URI::Error => e
|
||||
if (e.message =~ /URI must be ascii only/)
|
||||
value = URI.encode(value)
|
||||
retry
|
||||
|
Reference in New Issue
Block a user