column attribute for <textarea> is incorrect (#5049)
- Modify tagBuilder.MergeAttribute key to cols
This commit is contained in:
parent
35cc5b6e83
commit
581a5ea573
|
|
@ -658,7 +658,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
|||
|
||||
if (columns > 0)
|
||||
{
|
||||
tagBuilder.MergeAttribute("columns", columns.ToString(CultureInfo.InvariantCulture), true);
|
||||
tagBuilder.MergeAttribute("cols", columns.ToString(CultureInfo.InvariantCulture), true);
|
||||
}
|
||||
|
||||
tagBuilder.MergeAttribute("name", fullName, true);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Mvc.Core
|
|||
|
||||
// Assert
|
||||
Assert.Equal(
|
||||
"<textarea attr=\"HtmlEncode[[value]]\" columns=\"HtmlEncode[[2]]\" id=\"HtmlEncode[[Property1]]\" " +
|
||||
"<textarea attr=\"HtmlEncode[[value]]\" cols=\"HtmlEncode[[2]]\" id=\"HtmlEncode[[Property1]]\" " +
|
||||
"name=\"HtmlEncode[[Property1]]\" rows=\"HtmlEncode[[1]]\">" + Environment.NewLine +
|
||||
"HtmlEncode[[myvalue]]</textarea>",
|
||||
HtmlContentUtilities.HtmlContentToString(textAreaResult));
|
||||
|
|
@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Mvc.Core
|
|||
|
||||
// Assert
|
||||
Assert.Equal(
|
||||
"<textarea attr=\"HtmlEncode[[value]]\" columns=\"HtmlEncode[[2]]\" id=\"HtmlEncode[[Property1]]\" " +
|
||||
"<textarea attr=\"HtmlEncode[[value]]\" cols=\"HtmlEncode[[2]]\" id=\"HtmlEncode[[Property1]]\" " +
|
||||
"name=\"HtmlEncode[[Property1]]\" rows=\"HtmlEncode[[1]]\">" + Environment.NewLine +
|
||||
"</textarea>",
|
||||
HtmlContentUtilities.HtmlContentToString(textAreaForResult));
|
||||
|
|
|
|||
Loading…
Reference in New Issue