mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-18 16:06:53 +02:00
do NOT split RFC822 addresses containing comma in quoted name part eg. 'Becker, Ralf <rb@egroupware.org>'
This commit is contained in:
parent
ce622f591b
commit
c5b8261ec2
@ -196,6 +196,30 @@ export class Et2SelectEmail extends Et2Select
|
|||||||
{
|
{
|
||||||
return this.multiple ? "" : super._createImage(item);
|
return this.multiple ? "" : super._createImage(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overwritten to NOT split RFC822 addresses containing a comma in quoted name part
|
||||||
|
*
|
||||||
|
* E.g. '"Becker, Ralf" <rb@egroupware.org>'
|
||||||
|
*
|
||||||
|
* @param val
|
||||||
|
*/
|
||||||
|
set_value(val : string | string[] | number | number[])
|
||||||
|
{
|
||||||
|
if(typeof val === 'string' && val.indexOf(',') !== -1)
|
||||||
|
{
|
||||||
|
val = val.split(',');
|
||||||
|
for(let n=0; n < val.length-1; n++)
|
||||||
|
{
|
||||||
|
while (val[n].indexOf('@') === -1 && n < val.length-1)
|
||||||
|
{
|
||||||
|
val[n] += ',' + val[n+1];
|
||||||
|
val.splice(n+1, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.set_value(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user