vCards-js icon indicating copy to clipboard operation
vCards-js copied to clipboard

X-SOCIALPROFILE problem

Open mdevDE opened this issue 5 years ago • 4 comments

Hi first of all thank you for sharing this package with the community.

I had a problem when I tried to import a vCard with a X-SOCIALPROFILE into macOSX address book. The Mac app was not able to understand the encoding, please see the imported result: Bildschirmfoto 2019-10-20 um 11 46 33

Removing the encodingPrefix did the trick (line 378) - however I am not sure if this is conform to the vCard standard. formattedVCardString += 'X-SOCIALPROFILE' + ';TYPE=' + key + ':' + e(vCard.socialUrls[key]) + nl();

Could you please look into this problem?

Cheers, Michael

mdevDE avatar Oct 20 '19 09:10 mdevDE

Yes, seeing this on the iPhone too.

krokhale avatar Oct 20 '19 17:10 krokhale

i see this fields doesnt work on android, am i correct?

genesisemmloh avatar Jun 30 '22 08:06 genesisemmloh

As a quick fix, I am using:

            let vCardString = v.getFormattedString();
            vCardString = vCardString.replace(/SOCIALPROFILE;CHARSET=UTF-8;/gm, "SOCIALPROFILE;");

lukegeaves-ordapad avatar Jul 22 '22 11:07 lukegeaves-ordapad

Does this fix potentially break non-apple clients?

amit777 avatar Oct 12 '23 02:10 amit777