Closed
Description
The implementation of this method in v3.4
may return links like:
https://www.example.com//images/booya.jpg
I see that this has been reported and fixed for v4
in #13495
However, why don't we utilize our own helper and replace these 8 lines
Lines 166 to 174 in e78ab44
with
let uri = \Phalcon\Helper\Str::reduceSlashes(baseUri . strUri);
furthermore, we can reduce the overhead of invoking an extra function and directly use
let uri = preg_replace("#(?<!:)//+#", "/", baseUri . strUri);
The only scenario in which this wouldn't work is if we passed an url with relative protocols like //netdna.bootstrapcdn.com/twitter-bootstrap/2.3.4/css/bootstrap-combined.min.css
but in that case, that wouldn't be a local URL, therefore it does not pose a problem.