Skip to content

Replace 'fEncode' typo #4449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions xml/System.Web.UI/HtmlTextWriter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ alert('Hello');
</Docs>
</Member>
<Member MemberName="AddAttribute">
<MemberSignature Language="C#" Value="public virtual void AddAttribute (string name, string value, bool fEndode);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void AddAttribute(string name, string value, bool fEndode) cil managed" />
<MemberSignature Language="C#" Value="public virtual void AddAttribute (string name, string value, bool fEncode);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void AddAttribute(string name, string value, bool fEncode) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.HtmlTextWriter.AddAttribute(System.String,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub AddAttribute (name As String, value As String, fEndode As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void AddAttribute(System::String ^ name, System::String ^ value, bool fEndode);" />
<MemberSignature Language="F#" Value="abstract member AddAttribute : string * string * bool -&gt; unit&#xA;override this.AddAttribute : string * string * bool -&gt; unit" Usage="htmlTextWriter.AddAttribute (name, value, fEndode)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub AddAttribute (name As String, value As String, fEncode As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void AddAttribute(System::String ^ name, System::String ^ value, bool fEncode);" />
<MemberSignature Language="F#" Value="abstract member AddAttribute : string * string * bool -&gt; unit&#xA;override this.AddAttribute : string * string * bool -&gt; unit" Usage="htmlTextWriter.AddAttribute (name, value, fEncode)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
Expand All @@ -296,12 +296,12 @@ alert('Hello');
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="value" Type="System.String" />
<Parameter Name="fEndode" Type="System.Boolean" />
<Parameter Name="fEncode" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="name">A string containing the name of the attribute to add.</param>
<param name="value">A string containing the value to assign to the attribute.</param>
<param name="fEndode">
<param name="fEncode">
<see langword="true" /> to encode the attribute and its value; otherwise, <see langword="false" />.</param>
<summary>Adds the specified markup attribute and value to the opening tag of the element that the <see cref="T:System.Web.UI.HtmlTextWriter" /> object creates with a subsequent call to the <see cref="Overload:System.Web.UI.HtmlTextWriter.RenderBeginTag" /> method, with optional encoding.</summary>
<remarks>
Expand All @@ -314,7 +314,7 @@ alert('Hello');

Use the <xref:System.Web.UI.HtmlTextWriter.AddAttribute%28System.String%2CSystem.String%2CSystem.Boolean%29> method with `fEncode` set to `true`, if the attribute can possibly contain a quotation mark ("), a less than sign (<), or an ampersand (&). The method call will encode the attribute to meet the requirements of the requesting device. You can set `fEncode` to `false`, if you know that none of these characters will be generated, or if you know that the attribute is already encoded.

If the attribute type is `Style`, the value won't be encoded even if `fEndode` is `true`. Ensure that the style value is CSS-compliant and doesn't contain malicious code.
If the attribute type is `Style`, the value won't be encoded even if `fEncode` is `true`. Ensure that the style value is CSS-compliant and doesn't contain malicious code.

The coding pattern for rendering markup elements is as follows:

Expand Down