Skip to content

Commit d71ce00

Browse files
ReidB-MSFTRon Petrusha
authored andcommitted
Change NOTE to CAUTION in UTF8Encoding security warning (#1965)
NOTE is not an important notation, CAUTION is more appropriate for security sensitive warnings. This better matches, for instance, the documentation for BestFitMappingAttribute which contains a CAUTION note about encoding replacement characters changing the interpretation of the string.
1 parent b73418e commit d71ce00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Text/UTF8Encoding.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
6565
If the encoder is configured to provide a BOM, you can retrieve it by calling the <xref:System.Text.UTF8Encoding.GetPreamble%2A> method; otherwise, the method returns an empty array. Note that, even if a <xref:System.Text.UTF8Encoding> object is configured for BOM support, you must include the BOM at the beginning of the encoded byte stream as appropriate; the encoding methods of the <xref:System.Text.UTF8Encoding> class do not do this automatically.
6666
67-
> [!NOTE]
67+
> [!CAUTION]
6868
> To enable error detection and to make the class instance more secure, you should call the <xref:System.Text.UTF8Encoding.%23ctor%28System.Boolean%2CSystem.Boolean%29> constructor and set the `throwOnInvalidBytes` parameter to `true`. With error detection enabled, a method that detects an invalid sequence of characters or bytes throws an <xref:System.ArgumentException> exception. Without error detection, no exception is thrown, and the invalid sequence is generally ignored.
6969
7070
> [!NOTE]
@@ -1791,4 +1791,4 @@
17911791
</Docs>
17921792
</Member>
17931793
</Members>
1794-
</Type>
1794+
</Type>

0 commit comments

Comments
 (0)