fix #5988 - add inline script support to static rendering

This commit is contained in:
sbwalker
2026-01-30 09:00:58 -05:00
parent 81f4f87493
commit 7ab1184a04
7 changed files with 27 additions and 51 deletions

View File

@@ -625,11 +625,11 @@
{
if (resource.ResourceType == ResourceType.Stylesheet || resource.Level != ResourceLevel.Site)
{
if (resource.Url.StartsWith("~"))
if (!string.IsNullOrEmpty(resource.Url) && resource.Url.StartsWith("~"))
{
resource.Url = resource.Url.Replace("~", "/" + type + "/" + name + "/").Replace("//", "/");
}
if (!resource.Url.Contains("://") && alias.BaseUrl != "" && !resource.Url.StartsWith(alias.BaseUrl))
if (!string.IsNullOrEmpty(resource.Url) && !resource.Url.Contains("://") && alias.BaseUrl != "" && !resource.Url.StartsWith(alias.BaseUrl))
{
resource.Url = alias.BaseUrl + resource.Url;
}