-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Labels
area-System.NetdocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test codehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The documentation for HttpUtility.JavaScriptStringEncode states that the single quote character (') will be escaped as \'.
However, it gets escaped as \u0027.
Double quote is escaped as the documentation describes.
Expected Behavior
Expected that HttpUtility.JavaScriptStringEncode functions as documented.
Steps To Reproduce
Pass a string containing a single quote character (') to HttpUtility.JavaScriptStringEncode.
Here is a .NET fiddle displaying this behavior.
Exceptions (if any)
No response
.NET Version
8.0
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-System.NetdocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test codehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors