dotnet / dotnet/dotnet-api-docs
SecurityElement.Escape - escapes the ampersand, too, after the > is escaped for example
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.