Skip to content

WebUtility.HtmlDecode does not decode all HTML5 character entities #19103

Closed

Description

@devatwork

The current character entity replace dictionary used inside WebUtility uses the entity set as defined in HTML4, see https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs#L757.

However, the HTML5 spec defines additional entities, see https://www.w3.org/TR/html5/syntax.html#named-character-references.

I'm willing to send a PR to include the new named character references, if this that would be an acceptable change to the behavior of WebUtility.HtmlDecode. Any specific guidance with respect to making this change? Are there specific areas that need to be addressed?

Activity

  1. karelz commented on Oct 26, 2016

    @karelz
    Member

    Sounds like reasonable thing to do. @davidsh @CIPop any suggestions?

  2. karelz commented on Oct 26, 2016

    @karelz
    Member

    Feel free to submit a PR.
    Guidance:

    • We should avoid breaking compat -- i.e. do not change existing 'wrong' code (if you find any). Such changes should be discussed explicitly upfront.
    • Add test coverage
  3. karelz commented on Nov 21, 2016

    @karelz
    Member

    Continued design discussion from the PR dotnet/corefx#13152 (comment):
    @DamianEdwards do you have suggestion how to go from here?

    The safe route is to introduce just yet-another class for HTML5 only.

  4. karelz commented on Nov 23, 2016

    @karelz
    Member
  5. karelz commented on Oct 2, 2019

    @karelz
    Member

    Triage: Very little interest in last 3 years (just 2 upvotes). Let's close it. If it has higher demand, we can reconsider.

  6. transferred this issue fromdotnet/corefxon Jan 31, 2020
  7. added this to the 5.0 milestone on Jan 31, 2020
  8. ghost locked as resolved and limited conversation to collaborators on Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Netdesign-discussionenhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions