mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Escaped mailto
URLs would raise an exception
This prevents exceptions from being raised if a URL has an invalid component.
This commit is contained in:
@ -205,5 +205,10 @@ describe UrlHelper do
|
||||
url = "http://URL:%20https://google.com"
|
||||
expect(described_class.rails_route_from_url(url)).to eq(nil)
|
||||
end
|
||||
|
||||
it "does not raise for invalid mailtos" do
|
||||
url = "mailto:eviltrout%2540example.com"
|
||||
expect(described_class.rails_route_from_url(url)).to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user