mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 12:02:05 +08:00
FIX: URLs containing two # would fail to work
Some URLs in browsers are non compliant and contain twos `#` this commit adds special handling for this edge case by auto encoding any fragments containing `#`
This commit is contained in:
@ -3,6 +3,15 @@ require_dependency 'url_helper'
|
||||
|
||||
describe UrlHelper do
|
||||
|
||||
describe "#relaxed parse" do
|
||||
|
||||
it "can handle double #" do
|
||||
url = UrlHelper.relaxed_parse("https://test.com#test#test")
|
||||
expect(url.to_s).to eq("https://test.com#test%23test")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "#is_local" do
|
||||
|
||||
it "is true when the file has been uploaded" do
|
||||
|
Reference in New Issue
Block a user