Fixed group expanding in IE7 (#369) - string[i] syntax doesn't work in IE, use string.charAt(i) instead
This commit is contained in:
parent
36c20e8628
commit
2c34e0df5a
1 changed files with 5 additions and 3 deletions
|
@ -72,16 +72,18 @@ function rcube_calendar_ui(settings)
|
|||
{
|
||||
var result = [],
|
||||
strlen = str.length,
|
||||
q, p, i;
|
||||
q, p, i, char, last;
|
||||
|
||||
for (q = p = i = 0; i < strlen; i++) {
|
||||
if (str[i] == '"' && str[i-1] != '\\') {
|
||||
char = str.charAt(i);
|
||||
if (char == '"' && last != '\\') {
|
||||
q = !q;
|
||||
}
|
||||
else if (!q && str[i] == delimiter) {
|
||||
else if (!q && char == delimiter) {
|
||||
result.push(str.substring(p, i));
|
||||
p = i + 1;
|
||||
}
|
||||
last = char;
|
||||
}
|
||||
|
||||
result.push(str.substr(p));
|
||||
|
|
Loading…
Add table
Reference in a new issue