diff --git a/helpers/Image.php b/helpers/Image.php
index 7238c59d92..ecb920f6d4 100644
--- a/helpers/Image.php
+++ b/helpers/Image.php
@@ -47,7 +47,7 @@ public function fetchFavicon($url, $isHtmlUrl=false, $width=false, $height=false
elseif (substr($shortcutIcon, 0, 1)=='/')
$shortcutIcon = $urlElements['scheme'] . '://' . $urlElements['host'] . $shortcutIcon;
else
- $shortcutIcon = $url . $shortcutIcon;
+ $shortcutIcon = $url . '/' . $shortcutIcon;
}
$faviconAsPng = $this->loadImage($shortcutIcon, $width, $height);
@@ -159,6 +159,8 @@ private function parseShortcutIcon($html) {
$result = preg_match('//Ui', $html, $match1);
if($result==0)
$result = preg_match('/]*rel=("|\')shortcut icon\1.*>/Ui', $html, $match1);
+ if($result==0)
+ $result = preg_match('/]*rel=("|\')icon\1.*>/Ui', $html, $match1);
if($result>0) {
preg_match('/href=("|\')(.*)\1/Ui', $match1[0], $match2);
return $match2[2];