Skip to content

Incorrect output for XmlElement.InnerText property in example code #7776

@MikeRosoft

Description

@MikeRosoft

In https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmlelement.innertext the output in the comment of the example code is incorrect. (It appears that it's necessary to double-escape the & character.)

Existing code:
// <elem>Text containing <markup/> will have char(<) and char(>) escaped.</elem>

Correct:
// <elem>Text containing &lt;markup/&gt; will have char(&lt;) and char(&gt;) escaped.</elem>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Xmldoc-bugProblem with the content; needs to be fixedhelp wantedGood for community contributors to help [up-for-grabs]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions