When entering accented characters into an input type email in Chrome, it changes the value to something strange.
When entering the email: test@Bücher.ch the input value becomes: test@xn--bcher-kva.ch.
$('#email').val() // --> test@xn--bcher-kva.ch
document.getElementById('email').value // --> test@xn--bcher-kva.ch
This does not happen with an input type text, or in other major browsers.
See this fiddle for example. What is going on here and how do I get around it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…