Remove str_replace() as removing the path from the base misleads the
resolver, e.g. makeAbsoluteStr(http://example.org/?d=hello,img.jpg) actually leads to
http:img.jpg instead of http://example.org/img.jpg
Refactor the whole method to simplify it and rely more on Uri
Update the test with path containing leading double slashes as we
should keep the same behavior than browsers
Coverage remained the same at 96.456% when pulling 33e6758fbd253163e792753bf976b35fee106b67 on Kdecherf:fix/absoluteStr into 987aa6cb4d548492f27a2552e6c7f1193bde0ccf on j0k3r:master.
This commit achieves several things:
str_replace()
as removing the path from the base misleads the resolver, e.g.makeAbsoluteStr(http://example.org/?d=hello,img.jpg)
actually leads tohttp:img.jpg
instead ofhttp://example.org/img.jpg