nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
563 stars 169 forks source link

Importing a vcf file will skip the NOTE field content after the first comma #3721

Open milouse opened 9 months ago

milouse commented 9 months ago

Describe the bug

When trying to import an addressbook, if a contact contains some "NOTE" data containing a comma, the field is only imported up to the first comma.

Steps to reproduce

Given the following vcf file

BEGIN:VCARD
VERSION:3.0
N:Test;Alice;;;
FN:Alice Test
TEL;TYPE=CELL:redacted
NOTE:Some note without comma
END:VCARD
BEGIN:VCARD
VERSION:3.0
N:Test;Bob;;;
FN:Bob Test
TEL;TYPE=CELL:redacted
NOTE:Some note, with comma
END:VCARD
  1. Go to contacts app
  2. Click on Import contacts button
  3. Select previously saved vcf file
  4. Import it

Expected behavior

When looking at Alice Test contact, the Note field should read "Some note without comma"

When looking at Bob Test contact, the Note field should read "Some note, with comma"

Actual behavior

When looking at Alice Test contact, the Note field reads "Some note without comma" ✅

When looking at Bob Test contact, the Note field reads "Some note" ❗

Contact version

5.4.2 on NC 27.1.4

Operating system

Debian 5.10

PHP engine version

Other

Web server

Nginx

Database

MariaDB

Additional info

PHP 8.2.13

Installed as Nextcloud App for YunoHost https://github.com/YunoHost-Apps/nextcloud_ynh/

DiagonalArg commented 9 months ago

I get a slightly different result. The "," shows up in Notes rendered as "\,"

See https://github.com/nextcloud/contacts/issues/3736

hamza221 commented 8 months ago

more info on #3729 and #3736 , I could only reproduce on 5.4

DiagonalArg commented 8 months ago

On 5.5.0, in the Notes field, I'm getting quotation marks appearing as "\\"", colons appearing as "\:", though commas now seem to be fine.

In the Website field, I'm getting addresses looking like this: "https\\://foo.com" (yes, two slashes).

In the address field, I'm still getting things rendered as here: https://github.com/nextcloud/contacts/issues/3736#issuecomment-1853809369

DiagonalArg commented 8 months ago

All issues mentioned in previous post, not repaired in 5.5.1

bcutter commented 1 month ago

Status?