fix #3235 - </script> not being removed from Head Content

This commit is contained in:
sbwalker
2023-09-08 11:09:07 -04:00
parent 037f1ec887
commit 26921c899e
2 changed files with 6 additions and 6 deletions

View File

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