Skip to content

Import of a vCard version 4.0 doesn't interpret the phone number correctly #4357

Open
@ronnybremer

Description

@ronnybremer

Describe the bug

According to RFC 6350, the telephone item for version 4 of a vCard is specified as follows:

TEL;VALUE=uri;TYPE=home:tel:+33-01-23-45-67

However, when importing such an item in Nextcloud 30, the contact gets created with the telephone value of:

tel:+33-01-23-45-67

In my opinion, the "tel:" part needs to be stripped from the value while importing. It is just a hint of what type of URI the value is represented as.

Steps to reproduce

  1. Take a V4 vCard containing a telephone number in RFC conform format
  2. Import the card into an address book
  3. Open Contacts
  4. Select the newly imported contact
  5. notice the "Phone" section shows the wrong value prefixed by "tel:", in edit mode too

Expected behavior

The URI value should be correctly interpreted and the "tel:" prefix removed.

Actual behavior

The prefix "tel:" is treated as part of the phone number itself.

Contact version

7.0.0

Operating system

Rocky Linux 8

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database

MySQL

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions