Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ipeychev opened this issue Jul 30, 2017 · 1 comment
Open

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

ipeychev opened this issue Jul 30, 2017 · 1 comment

Comments

@ipeychev
Copy link

ipeychev commented Jul 30, 2017

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

<input id="email" autocomplete="off" type="email" placeholder="[email protected]" class="form-control" name="email" value="[email protected]" maxlength="100" autofocus="">

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

Thanks,

@ipeychev ipeychev changed the title Why does encodeForHTMLAttribute encodes '@' too? Why does encodeForHTMLAttribute encode '@' too? Aug 4, 2017
@ipeychev ipeychev changed the title Why does encodeForHTMLAttribute encode '@' too? Why "encodeForHTMLAttribute" encodes '@' too? Aug 4, 2017
@xeno6696
Copy link

xeno6696 commented Aug 6, 2022

Off the cuff I’m not sure as the At symbol isn’t reserved.

I don’t manage the node version of this, but it sounds like it could be a bug. Is the @ symbol used in javascript backends? I’m not familiar with node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants