mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Caldav: fix 3426148 decode and encode comma in RESOURCES field value
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1827 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
73edf89a10
commit
7081571ada
@ -139,7 +139,7 @@ public class VProperty {
|
||||
} else if (state == State.VALUE) {
|
||||
if (currentChar == '\\') {
|
||||
state = State.BACKSLASH;
|
||||
} else if (currentChar == ';') {
|
||||
} else if (currentChar == ';' || ("RESOURCES".equals(key) && currentChar == ',')) {
|
||||
addValue(line.substring(startIndex, i));
|
||||
startIndex = i + 1;
|
||||
}
|
||||
@ -382,6 +382,8 @@ public class VProperty {
|
||||
for (String value : values) {
|
||||
if (firstValue) {
|
||||
firstValue = false;
|
||||
} else if ("RESOURCES".equals(key)) {
|
||||
buffer.append(',');
|
||||
} else {
|
||||
buffer.append(';');
|
||||
}
|
||||
@ -423,6 +425,8 @@ public class VProperty {
|
||||
char c = value.charAt(i);
|
||||
if (c == '\n') {
|
||||
buffer.append("\\n");
|
||||
} else if ("RESOURCES".equals(key) && c==',') {
|
||||
buffer.append('\\').append(',');
|
||||
} else {
|
||||
buffer.append(value.charAt(i));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user