Skip to content

Two examples for each override of HtmlEncode incorrectly encode the (Space) character #10378

Open
@JeffSchwandt

Description

@JeffSchwandt

Type of issue

Code doesn't work

Description

Two of the code examples given for HtmlEncode(String, Boolean) and for HtmlEncode(String, TextWriter) incorrectly encode the (Space) character.

Code Example Incorrect Encoding Correct Encoding
alert('XSS Attack!'); alert('XSS Attack!'); alert('XSS Attack!');
"Anti-Cross Site Scripting Namespace" "Anti-Cross Site Scripting Namespace" "Anti-Cross Site Scripting Namespace"

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.web.security.antixss.antixssencoder.htmlencode?view=netframework-4.8

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Web.Security.AntiXss/AntiXssEncoder.xml

Document Version Independent Id

6789ad2b-05d7-e3fe-97b3-27e6ce8d971f

Article author

@Rick-Anderson

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.WebuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions