Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Labels Handling Problem #198

Open
7 tasks done
DiagonalArg opened this issue Dec 7, 2024 · 0 comments
Open
7 tasks done

Custom Labels Handling Problem #198

DiagonalArg opened this issue Dec 7, 2024 · 0 comments
Labels
bug Something is not working

Comments

@DiagonalArg
Copy link

DiagonalArg commented Dec 7, 2024

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.1.0

Affected Android/Custom ROM version

GrapheneOS

Affected device model

Pixel 7

How did you install the app?

GitHub releases

Steps to reproduce the bug

Create a vCard with custom labels like:

Cell First, Last
"Something; Tricky"

The labels are shown correctly in the app. They are also shown correctly in Stock.

Sharing the card from Stock to a text editor generates a vCard with no labels:

BEGIN:VCARD
VERSION:2.1
N:Last;First;Middle;;
FN:First Middle Last
TEL;:555-1212
TEL;:666-2323
NOTE:Some notes...
END:VCARD

Sharing the card from Fossify produces an error:

Error:
java.lang.illegalArgumentException: Pr...

Selecting a text editor anyway, produces an empty card.

Expected behavior

No error and a valid vCard.

Actual behavior

Error and empty vCard

Screenshots/Screen recordings

image

image

Additional information

The error appears to be caused by the quotation marks in the label for the number 666-2323. Removing those, I am able to export from Fossify as:

BEGIN:VCARD
VERSION:3.0
PRODID:ez-vcard 0.11.3
FN:First Middle Last
N:Last;First;Middle
TEL;TYPE="Cell First, Last":555-1212
TEL;TYPE="Something; Tricky":666-2323
NOTE:Some notes...
END:VCARD

I see that the spec doesn't seem to offer a means of quoting a double quote:

param-value = *SAFE-CHAR / DQUOTE *QSAFE-CHAR DQUOTE

   any-param  = (iana-token / x-name) "=" param-value *("," param-value)

   NON-ASCII = UTF8-2 / UTF8-3 / UTF8-4
     ; UTF8-{2,3,4} are defined in [[RFC3629](https://datatracker.ietf.org/doc/html/rfc3629)]

   QSAFE-CHAR = WSP / "!" / %x23-7E / NON-ASCII
     ; Any character except CTLs, DQUOTE

   SAFE-CHAR = WSP / "!" / %x23-39 / %x3C-7E / NON-ASCII
     ; Any character except CTLs, DQUOTE, ";", ":"

So unless you want to introduce '\"', in a way analogous to the use of '\;' in ORG:Company\;Department , then perhaps there should be a softer failure mode?

Question

What is the internal representation of contacts that allows "Something; Tricky" to be displayed, but not exported?

Also, other questions about the behavior, here.

@DiagonalArg DiagonalArg added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Dec 7, 2024
@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants