parent
7ed6a6cb57
commit
14c96f695a
|
|
@ -136,9 +136,9 @@ namespace Microsoft.AspNet.Html.Abstractions
|
|||
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
|
||||
/// <param name="content">The HTML encoded <see cref="string"/> to append.</param>
|
||||
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
|
||||
public static IHtmlContentBuilder AppendLineEncoded(this IHtmlContentBuilder builder, string encoded)
|
||||
public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builder, string encoded)
|
||||
{
|
||||
builder.AppendEncoded(encoded);
|
||||
builder.AppendHtml(encoded);
|
||||
builder.Append(HtmlEncodedString.NewLine);
|
||||
return builder;
|
||||
}
|
||||
|
|
@ -180,7 +180,7 @@ namespace Microsoft.AspNet.Html.Abstractions
|
|||
public static IHtmlContentBuilder SetContentEncoded(this IHtmlContentBuilder builder, string encoded)
|
||||
{
|
||||
builder.Clear();
|
||||
builder.AppendEncoded(encoded);
|
||||
builder.AppendHtml(encoded);
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Html.Abstractions
|
|||
/// </summary>
|
||||
/// <param name="encoded">The HTML encoded <see cref="string"/> to append.</param>
|
||||
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
|
||||
IHtmlContentBuilder AppendEncoded(string encoded);
|
||||
IHtmlContentBuilder AppendHtml(string encoded);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the content.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Microsoft.Extensions.Internal
|
|||
/// </summary>
|
||||
/// <param name="value">The HTML encoded <c>string</c> to be appended.</param>
|
||||
/// <returns>A reference to this instance after the Append operation has completed.</returns>
|
||||
public IHtmlContentBuilder AppendEncoded(string value)
|
||||
public IHtmlContentBuilder AppendHtml(string value)
|
||||
{
|
||||
Entries.Add(new HtmlEncodedString(value));
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -62,13 +62,13 @@ namespace Microsoft.AspNet.Html.Abstractions.Test
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void Builder_AppendLineEncoded_String()
|
||||
public void Builder_AppendHtmlLine_String()
|
||||
{
|
||||
// Arrange
|
||||
var builder = new TestHtmlContentBuilder();
|
||||
|
||||
// Act
|
||||
builder.AppendLineEncoded("Hi");
|
||||
builder.AppendHtmlLine("Hi");
|
||||
|
||||
// Assert
|
||||
Assert.Collection(
|
||||
|
|
@ -366,7 +366,7 @@ namespace Microsoft.AspNet.Html.Abstractions.Test
|
|||
return this;
|
||||
}
|
||||
|
||||
public IHtmlContentBuilder AppendEncoded(string encoded)
|
||||
public IHtmlContentBuilder AppendHtml(string encoded)
|
||||
{
|
||||
Entries.Add(new EncodedString(encoded));
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ namespace Microsoft.Extensions.Internal
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void AppendEncoded_DoesNotGetWrittenAsEncoded()
|
||||
public void AppendHtml_DoesNotGetWrittenAsEncoded()
|
||||
{
|
||||
// Arrange
|
||||
var content = new BufferedHtmlContent();
|
||||
content.AppendEncoded("Hello");
|
||||
content.AppendHtml("Hello");
|
||||
|
||||
var writer = new StringWriter();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue