Skip to content

Commit

Permalink
Trim slash off URL and relative paths to avoid //
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbs authored Sep 5, 2018
1 parent 02163a1 commit 60c9d1d
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 60c9d1d

Please sign in to comment.