6.0.0-beta1
7/31/25

[#4076] export vcard - escape of ;
Summary export vcard - escape of ;
Queue Turba
Queue Version 2.1.1
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester etiennesky (at) yahoo (dot) com
Created 06/23/2006 (6978 days ago)
Due
Updated 07/05/2006 (6966 days ago)
Assigned 06/23/2006 (6978 days ago)
Resolved 07/05/2006 (6966 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/05/2006 11:28:43 AM Jan Schneider State ⇒ Resolved
 
06/29/2006 08:50:04 PM etiennesky (at) yahoo (dot) com Comment #7 Reply to this comment
I'm sorry, but I don't have the time presently to install a CVS 
version of horde.



What I did, though, is have a look at the code in the CVS version and 
used that to fix the stable version.  It seems to work, in that it 
doesn't put superfluous \ but mozilla-thunderbird adress book has 
problems importing a vcard file that escapes ; and \ with \; and \\ 
respectively.



So I think that the fix is OK, here is what I did:



-----

             default:

                 // As of rfc 2426 2.4.2 semi-colon, comma, and colon

                 // must be escaped. Exclude MAILTO: though. This is a hack!

//                $value = str_replace(array(';', ':', ',', 'MAILTO\\:'),

//                                     array('\\;', '\\:', '\\,', 'MAILTO:'),

//                                     $value);

                if (is_array($attribute['values']) && count($attribute['values'])>1) {

                        $values = $attribute['values'];

                         if ($name == 'N' || $name == 'ADR') $glue = ';';

                        else $glue = ',';

                        $values = str_replace(array(';', ':', ',', 'MAILTO\\:'),

                                array('\\;', '\\:', '\\,', 'MAILTO:'),

                                $values);

                        $value = implode($glue, $values);

                } else {

                        // As of rfc 2426 2.4.2 semicolon, comma, and colon

                        // must be escaped. Exclude MAILTO: though. This is a

                        // hack!

                        $value = str_replace(array(';', ':', ',', 'MAILTO\\:'),

                                array('\\;', '\\:', '\\,', 'MAILTO:'),

                                $value);

                }

                 break;

-----



The 3 lines have been commented and replaced.



If you want a patch, I'll make one, but it will not be necessary to 
fix the CVS version as it seems ok.


06/28/2006 09:51:12 PM Jan Schneider Comment #6 Reply to this comment
Can you try with a FRAMEWORK_3 snapshot of Horde?
06/24/2006 04:01:58 PM etiennesky (at) yahoo (dot) com Comment #5 Reply to this comment
Sorry, Horde stable latest 3.1.1
06/24/2006 08:04:55 AM Jan Schneider Comment #4 Reply to this comment
You didn't answer my question, I asked you for your Horde version.
06/23/2006 10:38:33 PM etiennesky (at) yahoo (dot) com Comment #3 Reply to this comment
I only use the current stable 2.1.1



You need to have the ADR (adress) or N (Name) Field empty
06/23/2006 08:09:18 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
I can't reproduce this. Do you also use the latest Horde version?
06/23/2006 03:11:42 PM etiennesky (at) yahoo (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ export vcard - escape of ;
Queue ⇒ Turba
State ⇒ Unconfirmed
Reply to this comment
When I export in vcard, there are numerous ";" that

are converted to "\;" where they should not be.



This happens in the "N" (name) and "ADR" (adress)

fields,  when the values are empty.



As an example, here is part of one entry:



-----

N:Aerotechnik\;\;\;\;

ADR;TYPE=HOME:\;\;\;\;\;\;

ADR;TYPE=WORK:\;\;\;\;\;\;

-----



but it should read:

-----

N:Aerotechnik;;;;

ADR;TYPE=HOME:;;;;;;

ADR;TYPE=WORK:;;;;;;

-----





The problem is that is escapes ";" even when it is used

as a field seperator.



The code is in horde/lib/Horde/iCalendar.php in

function _exportvData on line 790.

Saved Queries