Describe the bug
If data:image/png is passed to Url::fromPath(), getAbsoluteUrl() returns data:///image/png.
To Reproduce
var_dump(Url::fromPath('data:image/png')->getAbsoluteUrl());
Problem
The scheme does automatically appended with ://. Additionally the base url, that is / is inserted.
Expected behavior
If data:image/png is passed to Url::fromPath(), getAbsoluteUrl() should return data:image/png instead of data:///image/png.
Additional context
Because ipl\Web\Widget\Link calls Url::fromPath() to create a URL object which calls $this->getAbsoulteUrl() in __toString() method, this causes problems e.g. when creating a download link. Browsers like chrome and firefox don't care about that, but safari does not trigger a download if the URL contains ///.
Describe the bug
If
data:image/pngis passed toUrl::fromPath(),getAbsoluteUrl()returnsdata:///image/png.To Reproduce
Problem
The scheme does automatically appended with
://. Additionally the base url, that is/is inserted.Expected behavior
If
data:image/pngis passed toUrl::fromPath(),getAbsoluteUrl()should returndata:image/pnginstead ofdata:///image/png.Additional context
Because
ipl\Web\Widget\LinkcallsUrl::fromPath()to create a URL object which calls$this->getAbsoulteUrl()in__toString()method, this causes problems e.g. when creating a download link. Browsers like chrome and firefox don't care about that, but safari does not trigger a download if the URL contains///.