Fixes #4471 - Don't call Enum.ToString()
This commit is contained in:
parent
67e18c70cc
commit
a73db1a9bd
|
|
@ -229,7 +229,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
output.PostContent.AppendHtml(tagBuilder.InnerHtml);
|
output.PostContent.AppendHtml(tagBuilder.InnerHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(Method, FormMethod.Get.ToString(), StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(Method, "get", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
antiforgeryDefault = false;
|
antiforgeryDefault = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||||
{
|
{
|
||||||
defaultMethod = true;
|
defaultMethod = true;
|
||||||
}
|
}
|
||||||
else if (string.Equals(method, FormMethod.Post.ToString(), StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(method, "post", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
defaultMethod = true;
|
defaultMethod = true;
|
||||||
}
|
}
|
||||||
|
|
@ -1104,7 +1104,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||||
if (string.IsNullOrEmpty(method))
|
if (string.IsNullOrEmpty(method))
|
||||||
{
|
{
|
||||||
// Occurs only when called from a tag helper.
|
// Occurs only when called from a tag helper.
|
||||||
method = FormMethod.Post.ToString().ToLowerInvariant();
|
method = "post";
|
||||||
}
|
}
|
||||||
|
|
||||||
// For tag helpers, htmlAttributes will be null; replaceExisting value does not matter.
|
// For tag helpers, htmlAttributes will be null; replaceExisting value does not matter.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue