Opened 5 years ago
Closed 5 years ago
#1485502 closed Bugs (fixed)
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 (1)
Change History (4)
Changed 5 years ago by jeblair
comment:1 Changed 5 years ago by alec
- Milestone changed from 0.3-beta to 0.2-stable
comment:2 Changed 5 years ago by thomasb
- Owner set to thomasb
- Status changed from new to assigned
comment:3 Changed 5 years ago by thomasb
- Resolution set to fixed
- Status changed from assigned to closed
Fixed in [b58f1184]

e-mail address detection was fixed in [bb8781c6]