client icon indicating copy to clipboard operation
client copied to clipboard

[OS X] Copied link has bogus Pasted-Contact.vcf

Open scansec opened this issue 11 years ago • 12 comments

Hello,

When using the copy share-link in the client, and pasting into another program (ex mail-client), it paste the content as a object called: Pasted-Contact.vcf, instead of a text-link

scansec avatar Jun 01 '15 23:06 scansec

Using client 1.8.1 build 2335

scansec avatar Jun 01 '15 23:06 scansec

hmm, I am not sure if I understand correctly. Please try to explain a bit more in detail what you are doing and expecting. Thanks

dragotin avatar Jun 02 '15 14:06 dragotin

When creating a link from the Mac OwnCloud client, select the "Copy Link" button and paste that link into an email. The expected behaviour is that a hyperlink would be pasted from the clipboard. What you get is a vcard contact as shown in the first image below.

owncloud-link-bug-1

Testing this further by looking at the received email, the "link" is presented as a vcard, consistent with what the Mac mail client showed above. If you click the vcard, it downloads into your Contacts. What we would expect is for the link to be displayed as hypertext and clicking that link would take you to the Owncloud instance to download the file.

owncloud-link-bug-2

razyr avatar Jun 15 '15 11:06 razyr

More info on the above.

If you paste the copied link into an application such as TextEdit, you get the expected URL. You can then copy/paste that URL from TextEdit into Mac Mail and you get the expected behaviour of a clickable link.

As an app which is purely an ASCII editor, TextEdit would have a limited understanding/view of the possible data types in the pasteboard, so it's probably more forgiving of what it's seeing copied in from the OwnCloud client. Mac Mail on the other hand would handle a wider variety of pasted types and thus mistake the text url for a vcard, based on the UTI.

It seems as if this is a QT bug where the UTI isn't being set correctly by QClipboard::setText(). I would think it should be forced to public.plaintext. Other apps such as SlickEdit have had the same problem reported. https://community.slickedit.com/index.php?topic=10962.0. SlickEdit users were able to work around the problem by turning off the html clipboard feature.

UTI docs are here: https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE

Docs on how UTI is implemented by OSX pasteboards is here: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbConcepts.html

razyr avatar Jun 15 '15 17:06 razyr

@razyr is right. I examined the clipboard with ClipboardViewer and found out, that when I copy a plain text from another application than it is only stored in the cliboard-spaces "public.utf8-plain-text" and "NSStringPBoardType". Which is absolutely enough. bildschirmfoto 2015-10-15 um 16 25 34

But when I copy the link via owncloud-client (rightclick ...) than the link is stored in 10 different clipboard-spaces. One of them (I guess the problematic one) is called public.vcard. So whenever I paste my clipboard into another application, it is up to the application to decide which clipboard space to use. Apple Mail apperently chooses "public.vcard" or "Apple VCard pasteboard type". (See attached image) bildschirmfoto 2015-10-15 um 16 24 49

There must be a way to copy the string into only the plain-text section...

stevenbuehner avatar Oct 15 '15 14:10 stevenbuehner

I think the "Needs Info" label could have been removed on this ticket back in June. Not much more we can document as users, but as it stands this functionality is essentially broken for Mac users.

razyr avatar Oct 15 '15 17:10 razyr

@guruz, I tested this issue, and now: The steps:

  1. Select the Copy link with a vcard contact
  2. Paste into the email, now I see the URL: screen shot 2015-10-22 at 09 27 17
  3. Send the e-mail, when you open the e-mail, you see the URL: screen shot 2015-10-22 at 09 29 06
  4. If you click on the URL, I see this: screen shot 2015-10-22 at 09 30 23
  5. If you download the .vcf, I see this: screen shot 2015-10-22 at 09 32 18

@guruz, my question is: This is correct?, Thanks

I tested this issue with: Desktop v ownCloud-2.1.0.2821-nightly20151022.pkg
Server v {"installed":true,"maintenance":false,"version":"8.1.4.0","versionstring":"8.1.4 RC1","edition":""}

Dianafg76 avatar Oct 22 '15 07:10 Dianafg76

It is a bug reported in QT today https://bugreports.qt.io/browse/QTBUG-48953 maybe it help you

szujak avatar Oct 23 '15 13:10 szujak

@szujak It's worked around in our nightly builds. Feel free to try (but they contain quite some untested code, so as usual be cautious and have backups..)

http://download.owncloud.com/desktop/daily/

guruz avatar Oct 23 '15 13:10 guruz

Nobody reported back, but I'm assuming this is fixed now in the builds mentioned above

guruz avatar Nov 03 '15 21:11 guruz

I'm seeing this same behavior with Mojave (10.14.3), Mail.App and Microsoft Remote Desktop -- Ctrl-C copy from MRD pastes as a VCF in Mail.app.

srhuddle avatar Mar 21 '19 13:03 srhuddle

@srhuddle Please open a new issue with the relevant information (steps to reproduce, version etc).

michaelstingl avatar Mar 21 '19 14:03 michaelstingl