-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rename AppendEncoded()
to AppendHtml()
and SetContentEncoded()
to SetHtmlContent()
#3225
Comments
Note |
I suspect there's only three choices here but would love to hear something better:
|
|
I chatted with @dougbu and we both like |
Like it, 👍 |
👍 love it! |
I like the name but wondering if it would make it a more attractive extension to be used when probably for most scenarios you want the content to be encoded? |
Oh it could certainly be an extension method if that simplifies the interface. The interface should have the minimum required. However, as far as how frequently it's used: I think HTML is just as common as non-HTML. Tag helpers, HTML helpers, etc. often have to render a lot of their own HTML plus page-generated stuff that needs to be encoded. |
We might not want to simplify the interface any further. An
The point about this that I was making earlier in the week is that you don't want to accidentally use
I think
|
Ok interface is fine then, and we'll go with |
…to `SetHtmlContent()` - aspnet/Mvc#3225, 1 of 3 Also correct parameter names and doc comments - add `xml-docs-test` to ensure this doc comments remain valid in the future
…to `SetHtmlContent()` - aspnet/Mvc#3225, 2 of 3 - also correct parameter names
…to `SetHtmlContent()` - #3225, 3 of 3
AppendEncoded()
to AppendHtml()
and SetContentEncoded()
to SetHtmlContent()
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.@rynowak @dougbu
The text was updated successfully, but these errors were encountered: