diff --git a/Oqtane.Client/UI/ThemeBuilder.razor b/Oqtane.Client/UI/ThemeBuilder.razor index 1ecba14b4..4931824b1 100644 --- a/Oqtane.Client/UI/ThemeBuilder.razor +++ b/Oqtane.Client/UI/ThemeBuilder.razor @@ -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);