Skip to content

Commit

Permalink
Merge pull request dotnetcore#241 from Velka-DEV/fix-html-parsing
Browse files Browse the repository at this point in the history
Fixing html document handling to invariant case
  • Loading branch information
zlzforever authored Feb 1, 2023
2 parents 9e80805 + 5e4a4f1 commit 1b9f029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DotnetSpider/DataFlow/Parser/DataParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public override async Task HandleAsync(DataFlowContext context)
else
{
var text = context.Response.ReadAsString().TrimStart();
if (text.StartsWith("<!DOCTYPE html") || text.StartsWith("<html"))
if (text.StartsWith("<!DOCTYPE html", StringComparison.InvariantCultureIgnoreCase) || text.StartsWith("<html", StringComparison.InvariantCultureIgnoreCase))
{
context.Selectable = CreateHtmlSelectable(context, text);
}
Expand Down

0 comments on commit 1b9f029

Please sign in to comment.