in static render mode do not filter scripts from head content

This commit is contained in:
sbwalker
2024-02-19 16:45:54 -05:00
parent 4271289db0
commit 4db3bafeda
2 changed files with 10 additions and 10 deletions

View File

@ -81,7 +81,7 @@
while (index >= 0)
{
var element = content.Substring(index, content.IndexOf(">", index) - index + 1);
if (!string.IsNullOrEmpty(element) && !element.ToLower().StartsWith("<script") && !element.ToLower().StartsWith("</script"))
if (!string.IsNullOrEmpty(element) && (PageState.RenderMode == RenderModes.Static || (!element.ToLower().StartsWith("<script") && !element.ToLower().StartsWith("</script"))))
{
if (!headcontent.Contains(element))
{