mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Do not let email-taglist items with none string ids being checked for validation as it'd throw errors
This commit is contained in:
parent
589498d549
commit
05e53f049d
@ -993,7 +993,8 @@ var et2_taglist_email = /** @class */ (function (_super) {
|
||||
}
|
||||
// We check free entries for valid email, and render as invalid if it's not.
|
||||
var valid = item.id != item.label || et2_taglist_email.EMAIL_PREG.test(item.id || '');
|
||||
if (!valid && item.id) {
|
||||
// don't let none string id being checked as it makes no sense, and it would throw errors
|
||||
if (!valid && item.id && typeof item.id == 'string') {
|
||||
// automatic quote 'Becker, Ralf <rb@stylite.de>' as '"Becker, Ralf" <rb@stylite.de>'
|
||||
var matches = item.id.match(/^(.*) ?<(.*)>$/);
|
||||
if (matches && et2_taglist_email.EMAIL_PREG.test('"' + matches[1].trim() + '" <' + matches[2].trim() + '>')) {
|
||||
|
@ -1198,7 +1198,8 @@ class et2_taglist_email extends et2_taglist
|
||||
// We check free entries for valid email, and render as invalid if it's not.
|
||||
let valid = item.id != item.label || et2_taglist_email.EMAIL_PREG.test(item.id || '');
|
||||
|
||||
if (!valid && item.id)
|
||||
// don't let none string id being checked as it makes no sense, and it would throw errors
|
||||
if (!valid && item.id && typeof item.id == 'string')
|
||||
{
|
||||
// automatic quote 'Becker, Ralf <rb@stylite.de>' as '"Becker, Ralf" <rb@stylite.de>'
|
||||
let matches = item.id.match(/^(.*) ?<(.*)>$/);
|
||||
|
Loading…
Reference in New Issue
Block a user