Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
fec6efe6a4
1 changed files with 5 additions and 3 deletions
|
@ -72,16 +72,18 @@ function rcube_calendar_ui(settings)
|
||||||
{
|
{
|
||||||
var result = [],
|
var result = [],
|
||||||
strlen = str.length,
|
strlen = str.length,
|
||||||
q, p, i;
|
q, p, i, char, last;
|
||||||
|
|
||||||
for (q = p = i = 0; i < strlen; i++) {
|
for (q = p = i = 0; i < strlen; i++) {
|
||||||
if (str[i] == '"' && str[i-1] != '\\') {
|
char = str.charAt(i);
|
||||||
|
if (char == '"' && last != '\\') {
|
||||||
q = !q;
|
q = !q;
|
||||||
}
|
}
|
||||||
else if (!q && str[i] == delimiter) {
|
else if (!q && char == delimiter) {
|
||||||
result.push(str.substring(p, i));
|
result.push(str.substring(p, i));
|
||||||
p = i + 1;
|
p = i + 1;
|
||||||
}
|
}
|
||||||
|
last = char;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.push(str.substr(p));
|
result.push(str.substr(p));
|
||||||
|
|
Loading…
Add table
Reference in a new issue