Ticket #1485502 (closed Bugs: fixed)

Opened 3 months ago

Last modified 3 months ago

vcard import errors (example from PINE)

Reported by: jeblair Owned by: thomasb
Priority: 5 Milestone: 0.2-stable
Component: PHP backend Version: 0.2-beta
Severity: normal Keywords:
Cc:

Description

Now that there is an import function, the vcard parser can be improved to accept variances in the vcard data supplied.

This patch addresses two things:

1) The EMAIL field doesn't require TYPE parameters, it can simply be EMAIL:foo@example.com. However RC's vcard parser assumes there will be type attributes. The first part of the patch corrects that.

2) The N field is required to have 5 parts, unfortunately PINE will sometimes emit a field without any semicolons in it's export. RC actually fails with a PHP error in this case. In the spirit of being generous with accepting data on the internet, RC should gracefully handle this case. The second part of the patch adds a line to the cleanup code (only run during an import) to add semicolons to N if none exist.

Here is an example VCARD export from PINE:

BEGIN:VCARD
VERSION:3.0
NICKNAME:nick
EMAIL:foo@example.com
NOTE:a note
FN:<Unknown>
N:<Unknown>
END:VCARD

Attachments

vcard.diff (1.2 kB) - added by jeblair 3 months ago.

Change History

Changed 3 months ago by jeblair

Changed 3 months ago by alec

  • milestone changed from 0.3-beta to 0.2-stable

Changed 3 months ago by thomasb

  • owner set to thomasb
  • status changed from new to assigned

e-mail address detection was fixed in r1891

Changed 3 months ago by thomasb

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r1998

Note: See TracTickets for help on using tickets.