Skip to content

t:htmlEntityDecode doesn't support all text entities. #1509

Open

Description

@csanders-git

Randomly this doesn't support all entities. like etc
See https://dev.w3.org/html5/html-author/charref for a list of others.

This is even brought up in the code:
https://github.com/SpiderLabs/ModSecurity/blob/caadf97524a4861456be176a8cb91dcbb76b97e4/apache2/msc_util.c#L1844

Activity

  1. self-assigned this
    on Nov 8, 2018
  2. added this to the v3.0.4 milestone on Nov 8, 2018
  3. fzipi commented on Oct 12, 2026

    @fzipi
    Collaborator

    Revisiting this one. Still true: 3.x t:htmlEntityDecode knows 45 named entities (src/actions/transformations/html_entity_decode.cc), 2.x a similar handful, and neither has 
 or the rest of the HTML5 list (over 2000 names). Adding the full table is mechanical: a generated lookup table from the WHATWG entity list plus tests.

    Keeping it as a feature for both branches. Help wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions