Bug 34512 - dataTransfer.getData('text/uri-list'): lines should be separated by CR-LF
Summary: dataTransfer.getData('text/uri-list'): lines should be separated by CR-LF
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 28293
  Show dependency treegraph
 
Reported: 2010-02-02 21:07 PST by Roland Steiner
Modified: 2013-03-28 19:28 PDT (History)
1 user (show)

See Also:


Attachments
patch - change output of getData('text/uri-list') to use CR-LF (11.66 KB, patch)
2010-02-02 22:14 PST, Roland Steiner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Steiner 2010-02-02 21:07:48 PST
As per RFC 2483 (http://www.rfc-editor.org./rfc/rfc2483.txt, page 11), text/* formats in general should have their lines separated with a CR-LF pair.

The current implementation for dataTransfer.getData('text/uri-list') however uses LF only.
Comment 1 Roland Steiner 2010-02-02 22:14:28 PST
Created attachment 47994 [details]
patch - change output of getData('text/uri-list') to use CR-LF

Patch changing the output from using just LF as line breaks to CR-LF, as per RFC 2483.
Comment 2 Oliver Hunt 2010-02-04 17:11:59 PST
(In reply to comment #1)
> Created an attachment (id=47994) [details]
> patch - change output of getData('text/uri-list') to use CR-LF
> 
> Patch changing the output from using just LF as line breaks to CR-LF, as per
> RFC 2483.

Have you tested this for compatibility with other UAs?
Comment 3 Roland Steiner 2010-02-05 00:29:05 PST
The FireFox documentation only mentions LF as line separators, e.g., in https://developer.mozilla.org/En/DragDrop/Drag_Operations#Performing_a_Drop , but the implementation seems to be fine with CRLF in setData("text/uri-list") followed by getData("URL"). 

FF also doesn't seem to generate URLs from files. 

I guess it'd be best if the UA handles both types of line endings, but still having a confusion here is far from ideal. Not sure what the best approach is. 

I have raised this (and other) question on the whatwg mailing list.
Comment 4 Eric Seidel (no email) 2010-02-17 15:48:03 PST
Comment on attachment 47994 [details]
patch - change output of getData('text/uri-list') to use CR-LF

It seems like we should wait to hear back from the whatwg before changing this behavior?

Clearing r? for now, feel free to re-set it at any time.