Merge pull request #4617 from sbwalker/dev

fix #4607 - site level scripts added twice in static rendering
This commit is contained in:
Shaun Walker 2024-09-16 13:22:10 -04:00 committed by GitHub
commit 36ad1ceef2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,6 @@
} }
// head content // head content
AddHeadContent(headcontent, PageState.Site.HeadContent);
if (!string.IsNullOrEmpty(PageState.Site.HeadContent)) if (!string.IsNullOrEmpty(PageState.Site.HeadContent))
{ {
headcontent = AddHeadContent(headcontent, PageState.Site.HeadContent); headcontent = AddHeadContent(headcontent, PageState.Site.HeadContent);

View File

@ -534,9 +534,9 @@
private string ParseScripts(string content) private string ParseScripts(string content)
{ {
// iterate scripts
var scripts = ""; var scripts = "";
if (!string.IsNullOrEmpty(content)) // in interactive render mode, parse scripts from content and inject into page
if (_renderMode == RenderModes.Interactive && !string.IsNullOrEmpty(content))
{ {
var index = content.IndexOf("<script"); var index = content.IndexOf("<script");
while (index >= 0) while (index >= 0)