Skip to content

SecurityElement.Escape - escapes the ampersand, too, after the > is escaped for example #10786

Open
@TheAnalyticalBtch

Description

@TheAnalyticalBtch

Type of issue

Code doesn't work

Description

When using SecurityElement.Escape, escaping the string "007 > 60 KV" returns the following:
"007 > 60 KV"
instead of
"007 > 60 KV"

In other words, the result when escaping the > character should be > but it seems to be escaping the result once the > has been escaped.

I have not tried it with other escape characters with ampersand.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.security.securityelement.escape?view=net-9.0&redirectedfrom=MSDN#System_Security_SecurityElement_Escape_System_String_

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security/SecurityElement.xml

Document Version Independent Id

e3abeb03-4f7d-494d-03f0-b7a198f04cd2

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.SecurityIssues related to security practices for .NET developers.untriagedNew 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