Skip to content

Escape interpolation into entities #35

@mbostock

Description

@mbostock

This:

My favorite currencies are &p${"ounds"};.

should produce this:

My favorite currencies are &pounds;.

However, it instead produces:

My favorite currencies are £s;.

I think in order to do this, we’d need to know whether we’re interpolating into a possibly valid HTML entity, and if so, the ampersand needs to be escaped so that it is equivalent to:

My favorite currencies are &p${"ound"}s;.

We should also test this, which works correctly today:

My favorite currencies are ${"&pounds;"}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions