diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.html
index e8b4d1dfd..7f8513a09 100644
--- a/htroot/yacysearchitem.html
+++ b/htroot/yacysearchitem.html
@@ -1,7 +1,9 @@
#(content)#::
-
+ #(favicon)#::
+
+ #(/favicon)#
#[title]#
#(heuristic)#::
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index 8874b2e33..34e258326 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -184,10 +184,15 @@ public class yacysearchitem {
String resultFileName = resultURL.getFileName();
prop.putHTML("content_target", target);
DigestURL faviconURL = null;
- if ((fileType == FileType.HTML || fileType == FileType.JSON) && !sb.isIntranetMode()) {
+ if ((fileType == FileType.HTML || fileType == FileType.JSON) && (resultURL.isHTTP() || resultURL.isHTTPS())) {
faviconURL = getFaviconURL(result, new Dimension(16, 16));
}
- prop.putHTML("content_faviconUrl", processFaviconURL(ImageViewer.hasFullViewingRights(header, sb), faviconURL));
+ if(faviconURL == null) {
+ prop.put("content_favicon", 0);
+ } else {
+ prop.put("content_favicon", 1);
+ }
+ prop.putHTML("content_favicon_faviconUrl", processFaviconURL(ImageViewer.hasFullViewingRights(header, sb), faviconURL));
prop.put("content_urlhash", urlhash);
prop.put("content_ranking", Float.toString(result.score()));
Date[] events = result.events();
diff --git a/htroot/yacysearchitem.json b/htroot/yacysearchitem.json
index 0e3aa9664..59f04c10f 100644
--- a/htroot/yacysearchitem.json
+++ b/htroot/yacysearchitem.json
@@ -9,7 +9,7 @@
"size": "#[size]#",
"sizename": "#[sizename]#",
"guid": "#[urlhash]#",
- "faviconUrl": "#[faviconUrl]#",
+ #(favicon)#::"faviconUrl": "#[faviconUrl]#",#(/favicon)#
"host": "#[host]#",
"path": "#[path]#",
"file": "#[file]#",