Skip to content

Why "encodeForHTMLAttribute" encodes '@' too? #4

Description

@ipeychev

The function encodeForHTMLAttribute encodes the symbol '@' too. However, if we have such an element:

<input id="email" autocomplete="off" type="email" placeholder="youremail@company.com" class="form-control" name="email" value="user@example.com" maxlength="100" autofocus="">

then encodeForHTMLAttribute encodes 'user@example.com' it to user&#x40;example.com.
What is the right way to encode this value so it looks like user@example.com?

Thanks,

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions