add null check
This commit is contained in:
parent
03374483e4
commit
452d0af8c9
|
@ -65,6 +65,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private string AddHeadContent(string headcontent, string content)
|
private string AddHeadContent(string headcontent, string content)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(content))
|
||||||
{
|
{
|
||||||
// format head content, remove scripts, and filter duplicate elements
|
// format head content, remove scripts, and filter duplicate elements
|
||||||
var elements = (">" + content.Replace("\n", "") + "<").Split("><");
|
var elements = (">" + content.Replace("\n", "") + "<").Split("><");
|
||||||
|
@ -78,6 +80,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return headcontent;
|
return headcontent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user