fix #4061 - invalid type for favicon
This commit is contained in:
parent
bb27099f9e
commit
c49ef49371
@ -34,14 +34,14 @@
|
||||
var headcontent = "";
|
||||
|
||||
// favicon
|
||||
var favicon = "favicon.ico";
|
||||
var favicontype = "x-icon";
|
||||
if (PageState.Site.FaviconFileId != null)
|
||||
{
|
||||
favicon = Utilities.FileUrl(PageState.Alias, PageState.Site.FaviconFileId.Value);
|
||||
favicontype = favicon.Substring(favicon.LastIndexOf(".") + 1);
|
||||
headcontent += $"<link id=\"app-favicon\" rel=\"icon\" href=\"{Utilities.FileUrl(PageState.Alias, PageState.Site.FaviconFileId.Value)}\" />\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
headcontent += $"<link id=\"app-favicon\" rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n";
|
||||
}
|
||||
headcontent += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/{favicontype}\" href=\"{favicon}\" />\n";
|
||||
|
||||
// head content
|
||||
AddHeadContent(headcontent, PageState.Site.HeadContent);
|
||||
|
Reference in New Issue
Block a user