Skip to content

Commit

Permalink
Merge pull request #9 from kitbs/patch-1
Browse files Browse the repository at this point in the history
Trim slash off URL and relative paths to avoid //
  • Loading branch information
ArthurHoaro authored Sep 8, 2018
2 parents 02163a1 + 60c9d1d commit 50fd2a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Favicon/Favicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private function getFavicon($url, $checkDefault = true) {

// Make sure the favicon is an absolute URL.
if( $favicon && filter_var($favicon, FILTER_VALIDATE_URL) === false ) {
$favicon = $url . '/' . $favicon;
$favicon = rtrim($url, '/') . '/' . ltrim($favicon, '/');
}

// Sometimes people lie, so check the status.
Expand Down

0 comments on commit 50fd2a0

Please sign in to comment.