NEW 34512
dataTransfer.getData('text/uri-list'): lines should be separated by CR-LF
https://bugs.webkit.org/show_bug.cgi?id=34512
Summary dataTransfer.getData('text/uri-list'): lines should be separated by CR-LF
Roland Steiner
Reported 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.
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
Roland Steiner
Comment 1 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.
Oliver Hunt
Comment 2 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?
Roland Steiner
Comment 3 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.
Eric Seidel (no email)
Comment 4 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.
Note You need to log in before you can comment on or make changes to this bug.