mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-07 22:10:57 +01:00
backport of Nathans r48904: trim email addresses to avoid validation errors
This commit is contained in:
parent
c779625947
commit
d65b786b26
@ -495,6 +495,15 @@ var et2_taglist_email = et2_taglist.extend(
|
|||||||
|
|
||||||
selectionRenderer: function(item)
|
selectionRenderer: function(item)
|
||||||
{
|
{
|
||||||
|
// Trim
|
||||||
|
if(typeof item.id == 'string')
|
||||||
|
{
|
||||||
|
item.id = item.id.trim();
|
||||||
|
}
|
||||||
|
if(typeof item.label == 'string')
|
||||||
|
{
|
||||||
|
item.label = item.label.trim();
|
||||||
|
}
|
||||||
// We check free entries for valid email, and render as invalid if it's not.
|
// We check free entries for valid email, and render as invalid if it's not.
|
||||||
var valid = item.id != item.label || et2_url.prototype.EMAIL_PREG.test(item.id || '');
|
var valid = item.id != item.label || et2_url.prototype.EMAIL_PREG.test(item.id || '');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user