This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Rename AppendEncoded()
to AppendHtml()
and SetContentEncoded()
to SetHtmlContent()
#3225
Closed
Description
In the following tag helper, I am using AppendEncoded
to append <b>
even though its not really encoded and is just raw content.
@NTaylorMullen suggested AppendRaw
which seems like a good name to indicate what it does.
[HtmlTargetElement("greeting")]
public class GreetingTagHelper : TagHelper
{
public string text { get; set; }
public override void Process(TagHelperContext context, TagHelperOutput output)
{
output.TagName = null;
output.Content.AppendEncoded("<b>");
output.Content.Append(text);
output.Content.AppendEncoded("</b>");
}
}