Summary: | kaddressbook doesn't handle line breaks correctly in the notes field. | ||
---|---|---|---|
Product: | [Applications] kaddressbook | Reporter: | Divan Santana <divan> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | krammer, tokoe |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdepimlibs/f7a29b54327876508e834c407173084e0f626252 | Version Fixed In: | 4.8.3 |
Sentry Crash Report: |
Description
Divan Santana
2012-04-05 15:43:26 UTC
As per discussion here: http://lists.kde.org/?t=133379575800003&r=1&w=2 After further investigation it seems the problem is possibly in the vcard parser. When exporting the problematic contact it uses the \N CRLF character sequence which is valid according to the RFC: https://www.ietf.org/rfc/rfc2426.txt $ cat Downloads/Lastname\,\ Firstname.vcf BEGIN:VCARD VERSION:3.0 FN:Lastname\, Firstname N:Lastname;Firstname;;; EMAIL;TYPE=internet:firstname@lastname.org NOTE:This is line one of the notes section\NThis is line two of the notes section\NThis is line three of the notes section\NThis is line four of the notes section REV:2012-04-05T23:09:44Z UID:8e548460-3843-4e39-9d71-19c7dad93864:522525 END:VCARD Just to update: I have most likely found a fix for that but the commit will have to wait until someone with more knowledge about the internals of the changed code has had time to verify that there are not bad consequences. https://git.reviewboard.kde.org/r/104509/ Quick question: does Zimbra handle vcards with \n properly? I.e. if you create a new contact with multiline notes in KAddressBook and save it to the Zimbra server, does its web interface and your Android phone display that correctly? Well I create a contact in KAddressBook now and in the notes field put: This is line one This is line two This is line three This is line four I sync with zimbra. Zimbra and Android phone display the notes field correctly. However, I then from zimbra web interface email the contact from addressbook as VCF and below is the result: $ cat Downloads/Testing\ Contact.vcf BEGIN:VCARD VERSION:3.0 FN:Testing Contact N:Contact;Testing;;; NOTE:This is line one\NThis is line two\NThis is line three\NThis is line four REV:2012-04-13T23:46:31Z UID:PdJOY3AP9k END:VCARD Perhaps Zimbra auto converts it to \N from \n . I hope the patch is allowed through and addresses it, it will make kaddressbook syncing with latest Zimbra server work just fine. KDE devs, I can provide a Zimbra account for testing without a problem or any other information needed to help. Thanks for the efforts. Git commit d0f37e740e1715d7b0228da9912a43db8051fde6 by Kevin Krammer. Committed on 07/04/2012 at 22:07. Pushed by krake into branch 'KDE/4.8'. Treat \N as a valid new line sequence in vcard input The vCard RFC has a note on fields of type text that suggests that both \n and \N are to be treated as new line sequences: . The method for specifying CRLF character sequences in text type values has been changed. The CRLF character sequence in a text type value is specified with the backslash character sequence "\n" or "\N". Backport of f7a29b54327876508e834c407173084e0f626252 FIXED-IN: 4.8.3 REVIEW: 104509 A +8 -0 kabc/vcardparser/tests/vcard8.vcf A +8 -0 kabc/vcardparser/tests/vcard8.vcf.ref M +1 -0 kabc/vcardparser/vcardparser.cpp http://commits.kde.org/kdepimlibs/d0f37e740e1715d7b0228da9912a43db8051fde6 Git commit f7a29b54327876508e834c407173084e0f626252 by Kevin Krammer. Committed on 07/04/2012 at 22:07. Pushed by krake into branch 'master'. Treat \N as a valid new line sequence in vcard input The vCard RFC has a note on fields of type text that suggests that both \n and \N are to be treated as new line sequences: . The method for specifying CRLF character sequences in text type values has been changed. The CRLF character sequence in a text type value is specified with the backslash character sequence "\n" or "\N". FIXED-IN: 4.8.3 REVIEW: 104509 M +2 -0 kabc/vcardparser/testroundtrip.qrc A +8 -0 kabc/vcardparser/tests/vcard8.vcf A +8 -0 kabc/vcardparser/tests/vcard8.vcf.ref M +1 -0 kabc/vcardparser/vcardparser.cpp http://commits.kde.org/kdepimlibs/f7a29b54327876508e834c407173084e0f626252 |