Fix so unicode in local part of the email address is also supported in recipient inputs (#6490)

Relax javascript email address checker.
pull/6495/head
Aleksander Machniak 6 years ago
parent 288a0fa137
commit a86d9cd5aa

@ -17,6 +17,7 @@ CHANGELOG Roundcube Webmail
- Elastic: Improved UX of search dialogs (#6416)
- Elastic: Fix unwanted thread expanding when selecting a collapsed thread in non-mobile mode (#6445)
- Log errors caused by low pcre.backtrack_limit when sending a mail message (#6433)
- Fix so unicode in local part of the email address is also supported in recipient inputs (#6490)
- Fix bug where autocomplete list could be displayed out of screen (#6469)
- Fix style/navigation on error page depending on authentication state (#6362)
- Fix so invalid smtp_helo_host is never used, fallback to localhost (#6408)

@ -402,7 +402,7 @@ triggerEvent: function(evt, e)
// check if input is a valid email address
// By Cal Henderson <cal@iamcal.com>
// http://code.iamcal.com/php/rfc822/
function rcube_check_email(input, inline, count)
function rcube_check_email(input, inline, count, strict)
{
if (!input)
return count ? 0 : false;
@ -438,7 +438,7 @@ function rcube_check_email(input, inline, count)
'\\u05d1\\u05f2\\u05b7\\u05e9\\u05e4\\u05bc\\u05d9\\u05dc\\x2e\\u05d8\\u05e2\\u05e1\\u05d8'
],
icann_addr = 'mailtest\\x40('+icann_domains.join('|')+')',
word = '('+atom+'|'+quoted_string+')',
word = strict ? '('+atom+'|'+quoted_string+')' : '[^\\u0000-\\u0020\\u002e\\u00a0\\u0040\\u007f\\u2028\\u2029]+',
delim = '[,;\\s\\n]',
local_part = word+'(\\x2e'+word+')*',
addr_spec = '(('+local_part+'\\x40'+domain+')|('+icann_addr+'))',

Loading…
Cancel
Save