Fix TagManager#local_url? erroring out on invalid URL (#18580)

th-downstream
Claire 2 years ago committed by GitHub
parent c5eabffe34
commit 49de4bf341

@ -24,8 +24,11 @@ class TagManager
def local_url?(url)
uri = Addressable::URI.parse(url).normalize
return false unless uri.host
domain = uri.host + (uri.port ? ":#{uri.port}" : '')
TagManager.instance.web_domain?(domain)
rescue Addressable::URI::InvalidURIError
false
end
end

Loading…
Cancel
Save