forked from extern/egroupware
make parsing of arguments more robust
This commit is contained in:
parent
b692346cce
commit
d3f2b0a1f9
@ -69,7 +69,12 @@ egw_LAB.wait(function() {
|
||||
var args = [];
|
||||
if (matches.length > 1 && matches[2] !== undefined)
|
||||
{
|
||||
args = JSON.parse('['+matches[2].replace(/'/g,'"')+']');
|
||||
try {
|
||||
args = JSON.parse('['+matches[2]+']');
|
||||
}
|
||||
catch(e) { // deal with '-encloded strings (JSON allows only ")
|
||||
args = JSON.parse('['+matches[2].replace(/','/g, '","').replace(/((^|,)'|'(,|$))/g, '$2"$3')+']');
|
||||
}
|
||||
}
|
||||
args.unshift(matches[1]);
|
||||
return et2_call.apply(this, args);
|
||||
|
Loading…
Reference in New Issue
Block a user