Use ordinal comparison when detecting event handler attributes. Fixes #24465 (#24471)

This commit is contained in:
Steve Sanderson 2020-07-31 17:54:35 +01:00 committed by GitHub
parent 3e1e69ecce
commit f28ef7c3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -954,7 +954,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
// based on the common usage of attributes for DOM events.
if ((newFrame.AttributeValue is MulticastDelegate || newFrame.AttributeValue is EventCallback) &&
newFrame.AttributeName.Length >= 3 &&
newFrame.AttributeName.StartsWith("on"))
newFrame.AttributeName.StartsWith("on", StringComparison.Ordinal))
{
diffContext.Renderer.AssignEventHandlerId(ref newFrame);
}