fix(web(js)): improve validation of email addresses

Overwrite the AngularJS validation and transformation of email inputs in
order to support umlauts and eszett.
This commit is contained in:
Francis Lachapelle
2022-07-28 10:43:49 -04:00
parent 5e6ad77d4c
commit 67ccf748ed
9 changed files with 32 additions and 22 deletions
@@ -279,7 +279,7 @@
if (angular.isString(this[type])) {
// The recipient is a string; try to extract the name
var emailRE = /<?(([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?))/i;
var match = this[type].match(emailRE);
var match = this[type].match(String.emailRE);
if (match) {
address = this[type].substring(0, match.index);
address = address.replace(/^\"? *(.+?)\"? *$/, "$1");