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

@@ -24,7 +24,7 @@ namespace Oqtane.Models
get => _url;
set
{
_url = (value.Contains("://")) ? value : (!value.StartsWith("/") && !value.StartsWith("~") ? "/" : "") + value;
_url = (string.IsNullOrEmpty(value) || value.Contains("://")) ? value : (!value.StartsWith("/") && !value.StartsWith("~") ? "/" : "") + value;
}
}

View File

@@ -501,11 +501,11 @@ namespace Oqtane.Shared
public static string GetUrlPath(string url)
{
if (url.Contains("?"))
if (!string.IsNullOrEmpty(url) && url.Contains("?"))
{
url = url.Substring(0, url.IndexOf("?"));
}
return url;
return url ?? "";
}
public static string LogMessage(object @class, string message)