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

URL's being imported and then displayed with the "\" #3918

Open
DiagonalArg opened this issue May 7, 2024 · 2 comments
Open

URL's being imported and then displayed with the "\" #3918

DiagonalArg opened this issue May 7, 2024 · 2 comments
Labels

Comments

@DiagonalArg
Copy link

DiagonalArg commented May 7, 2024

Describe the bug

Import this vCard, which was exported from google, and find that the URL is being imported and then displayed with the "\"

BEGIN:VCARD
VERSION:3.0
FN:BMW of Southpoint (Durham; NC)
N:;BMW of Southpoint (Durham\; NC);;;
TEL;TYPE=MAIN:+1.888 693 3645
item1.ADR:;;225 Kentington Dr;Durham;NC;27713;US;225 Kentington Dr\nDurham
 \, NC 27713\nUS
item1.X-ABLabel:
item2.URL:https\://www.bmwsouthpoint.com/
item2.X-ABLabel:homePage
NOTE:Called 877-432-7841 to make appointment.\n\nHours: M-F\:9A-8P\; Sa\:9A
 -6P
CATEGORIES:Auto,myContacts
END:VCARD

image

Steps to reproduce

See above.

Expected behavior

https://www.bmwsouthpoint.com/

Actual behavior

https\\://www.bmwsouthpoint.com/

Contact version

5.5.3

Operating system

CentOS 7.9

PHP engine version

PHP 8.1

Web server

Nginx

Database

PostgreSQL

Additional info

Thanks for your work!

@st3iny
Copy link
Member

st3iny commented May 29, 2024

There seems to be something wrong in Google's vCard exporter. In vCard version 3.0 the colon character must not be escaped anymore1. I changed the URL line to item2.URL:https://www.bmwsouthpoint.com/ and it works as expected.

The original vCard passes validation checks and is not wrong per se but the escaped colon \: is superfluous and thus interpreted literally as part of the URL.

Footnotes

  1. https://evertpot.com/escaping-in-vcards-and-icalendar/#vcard-30

@DiagonalArg
Copy link
Author

I see. Would that just be when it appears in a URL?

If so, I'll try sed'ing my DB to get rid of those and see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants