TTT
TTT

Reputation: 6896

HTML5 e-mail input doesn't validate utf-8 in Chrome 39

I have this element in my form:

<input type="email" placeholder="Enter your e-mail">

When I enter שלום@שלום.com, Google Chrome 39 says:

why?

But why? I thought new e-mail addresses can have UTF-8 characters so that shouldn't be the problem.

Upvotes: 1

Views: 648

Answers (3)

imvickykumar999
imvickykumar999

Reputation: 182

This is to avoid SQL Injection.

cur.execute("select UNAME from users where EMAIL=? and UPASS=?",(email,pwd))

enter image description here

Upvotes: 0

tsh
tsh

Reputation: 4748

It seems there is a bug in Chrome or HTML specification. Check out these:

Here is a workaround: use שלום@xn--9dbne9b.com instead of שלום@שלום.com

Upvotes: 2

JacobF
JacobF

Reputation: 2485

Have you tried adding accept-charset="UTF-8" to the form tag.?


Ideally, you set UTF-8 in the Content-Type http header: http://www.w3.org/International/O-HTTP-charset

Or as a meta tag in your html: <meta charset="utf-8">

Upvotes: 0

Related Questions