W3C home > Mailing lists > Public > www-tag@w3.org > June 2010

Re: Copy to Clipboard - ambush and abuse by javascript

From: Tim Berners-Lee <timbl@w3.org>
Date: Wed, 2 Jun 2010 22:11:43 -0400
Cc: "www-tag@w3.org" <www-tag@w3.org>
Message-Id: <8803481F-A892-451A-83A2-07EDAE5D3EBB@w3.org>
To: Noah Mendelsohn <nrm@arcanedomain.com>

On 2010-06 -02, at 15:45, Noah Mendelsohn wrote:

> Tim Berners-Lee wrote:
> > This I think seriously violates the function
> > of Copy, and the user's rights.
> Yes, I agree completely.  It's obnoxious, unhelpful, and contrary to the spirit of the platform specifications for copy/paste.
> > Should browsers ensure that Copy is always a
> > read-only operation, unless they have INSTALLED code to do something
> > different?
> I agree with the spirit of what you're asking for, but I'm not sure the words "read-only" capture the essence of what's needed.  Copy is, of course, an operation that identifies data for transfer, and the corresponding paste is necessarily an update operation on the target document or system.

Yes yes "read only" isn't the perfect phrase but you know what I mean. No side effects apart from on the clipboard and then the information on hte clipboard a suitable form of what I saw when  I pasted.

> My deeper concern is that in fact certain sorts of data manipulation are expected and useful, particularly when doing format conversions as part of copy/paste.  So, for example, if I am reading an HTML document and I select multiple paragraphs of text, it might well be appropriate for a copy operation to put at least two versions on the clipboard:
> HTML Clipboard format:
> <p>Text of para1</p>
> <p>Text of para2</p>
> Text Clipboard format:
> Text of Para 1\n
> \n\n
> Text of Para 2

The constraint here is a little like conneg. In fact there
is negotiation, and the same rule is sort of "best you can do in hte circumstances, but don't add anything which wasn't there originally".

(Which is like "ignore stuff you don't understand")

> I think it's important that whatever rules we set for browsers not prohibit such helpful re-expression of the same information using different formats.  We need to find a formulation that encourages such useful reformatting, but prohibits the sort of inappropriate updates that are described in the Daring Fireball posting. In any case, it doesn't seem to me that the term "read-only" quite captures what we want.  Thank you.

Well, a recent the bug leapt out at me is it is quite like the goal of Oshani Seneviratne's work here in CSAIL to automatically capture the 
licensing data (such as CC license, to whom attribution required, etc)
on copy so that credits can automatically be given where due,
and one can check a mashup for not violating the terms of its component bits.
Oshani's demos use a special content menu item "copy with license" so the user is deliberate and made aware of it.
http://dig.csail.mit.edu/2009/Talks/0518-F2FLighteningTalk-os/ slide 8
the same technique could be just made the default, for clipboard types which can handle the metadata. -- quite a lot, with XMP maybe.

Received on Thursday, 3 June 2010 02:11:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:34 UTC