View Issue Details

IDProjectCategoryView StatusLast Update
0001121SOGo Connectorwith SOGopublic2011-03-09 20:15
Reporterrthibert Assigned Towsourdeau 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.104 
Summary0001121: Problem with CR and special chaacter codes between thunderbird address book , SOGO and iphone
Description

When a contact contain ";" "," CR or LF there is inconsistency between synchronistation and in some case the iphone address book crash ...

A submit a path whitch correct this

TagsNo tags attached.

Activities

2011-02-05 12:02

 

patchSogo.patch (2,648 bytes)   
diff -Nur ./chrome/content/sogo-connector/general/vcards.utils.js /home/ubunitech/Bureau/sogo-connector@inverse.ca/chrome/content/sogo-connector/general/vcards.utils.js
--- ./chrome/content/sogo-connector/general/vcards.utils.js	2010-11-17 11:08:42.000000000 +0100
+++ /home/ubunitech/Bureau/sogo-connector@inverse.ca/chrome/content/sogo-connector/general/vcards.utils.js	2010-11-21 15:03:00.663745000 +0100
@@ -42,10 +42,12 @@
     theString = theString.replace(/\\/g, "\\\\");
     theString = theString.replace(/,/g, "\\,");
     theString = theString.replace(/;/g, "\\;");
-    theString = theString.replace(/,/g, "\\,");
 
-    // theString.replace(/\n/g, "\\n,");
-    // theString.replace(/\r/g, "\\r,");
+//     theString =theString.replace(/\r\n/g, "\\n");    // d�comment� RT
+     theString =theString.replace(/\n/g, "\\n");        // d�comment� RT
+     theString =theString.replace(/\r/g, "");           // d�comment� RT
+                                                               
+     //theString =theString.replace(/\r/g, "\\r");      // d�comment� RT
 
     return theString;
 }
@@ -73,12 +75,16 @@
 }
 
 function unescapedFromCard(theString) {
-    theString = theString.replace(/\\/g, "\\");
-    theString = theString.replace(/\,/g, ",");
-    theString = theString.replace(/\;/g, ";");
-    theString = theString.replace(/\,/g, ",");
-    // theString.replace(/\\n/g, "\n,");
-    // theString.replace(/\\r/g, "\r,");
+//    theString = theString.replace(/\\/g, "\\");       comment� par RT
+//    theString = theString.replace(/\,/g, ",");        comment� par RT
+//    theString = theString.replace(/\;/g, ";");        comment� par RT
+//    theString = theString.replace(/\,/g, ",");        comment� par RT
+    
+    theString = theString.replace(/\\\\/g, "\\");     // modifi� par RT
+    theString = theString.replace(/\\,/g, ",");       // modifi� par RT
+    theString = theString.replace(/\\;/g, ";");       // modifi� par RT
+    theString = theString.replace(/\\n/g, "\n");      // d�commant� par RT
+//    theString = theString.replace(/\\r/g, "\r");    // d�commant� par RT
 
     return theString;
 }
@@ -742,7 +748,8 @@
     let notes = card.getProperty("Notes", "");
     if (notes.length) {
         vCard += foldedLine("NOTE:"
-                            + escapedForCard(notes.replace(/\n/g, "\r\n"))) + "\r\n";
+//                            + escapedForCard(notes.replace(/[\r\n]+/g, "\\n"))) + "\r\n";                   Modification RT
+                              + escapedForCard(notes.replace(/\n/g, "\r\n"))) + "\r\n";
     }
 
     let aimScreenName = card.getProperty("_AimScreenName", "");
patchSogo.patch (2,648 bytes)   
rthibert

rthibert

2011-02-05 12:08

reporter   ~0002091

It seems that the problem is the same as the http://www.sogo.nu/bugs/view.php?id=1110 (i do my path before ...) but the solution is slightly different.

wsourdeau

wsourdeau

2011-03-09 20:15

viewer   ~0002238

Fixed in http://mtn.inverse.ca/revision/diff/9e6ee943100d0901c7ffa5709f848904e299f73a/with/145b0d97054c9a16b27a27e77055a4923d023ead

Thanks for the patch!

Issue History

Date Modified Username Field Change
2011-02-05 12:02 rthibert New Issue
2011-02-05 12:02 rthibert File Added: patchSogo.patch
2011-02-05 12:08 rthibert Note Added: 0002091
2011-03-09 20:15 wsourdeau Note Added: 0002238
2011-03-09 20:15 wsourdeau Status new => resolved
2011-03-09 20:15 wsourdeau Resolution open => fixed
2011-03-09 20:15 wsourdeau Assigned To => wsourdeau