Skip to content

HTMLString.Tag.head() does not escape HTML attribute values #8

@cubiclesoft

Description

@cubiclesoft

Example:

blah = new HTMLString.Tag('a', { 'href': '/test.html', 'data-test': JSON.stringify({'id': 12, 'test': 'This is a test'}) });
blah.head();

It currently outputs:

<a data-test="{"id":12,"test":"This is a test"}" href="/test.html">

It should output:

<a data-test="{&quot;id&quot;:12,&quot;test&quot;:&quot;This is a test&quot;}" href="/test.html">

Or similar.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions