mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
Carddav: fix regression in VCardWriter
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1220 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d5f2f73691
commit
bb1b0047b4
@ -27,6 +27,17 @@ public class VCardWriter extends ICSBufferedWriter {
|
||||
writeLine("VERSION:3.0");
|
||||
}
|
||||
|
||||
public void appendProperty(String propertyName, String propertyValue) {
|
||||
if ((propertyValue != null) && (propertyValue.length() > 0)) {
|
||||
write(propertyName);
|
||||
write(":");
|
||||
StringBuilder valueBuffer = new StringBuilder();
|
||||
appendEncodedValue(valueBuffer, propertyValue);
|
||||
writeLine(valueBuffer.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void appendProperty(String propertyName, String... propertyValue) {
|
||||
boolean hasValue = false;
|
||||
for (String value : propertyValue) {
|
||||
@ -60,7 +71,7 @@ public class VCardWriter extends ICSBufferedWriter {
|
||||
*/
|
||||
private void appendEncodedValue(StringBuilder buffer, String value) {
|
||||
if (value != null) {
|
||||
for (int i = 0; i < value.length();i++) {
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char c = value.charAt(i);
|
||||
if (c == ',' || c == ';') {
|
||||
buffer.append('\\');
|
||||
|
Loading…
Reference in New Issue
Block a user