RESOLVED FIXED185205
Can't copy and paste URLs that have no title into Mail (macOS)
https://bugs.webkit.org/show_bug.cgi?id=185205
Summary Can't copy and paste URLs that have no title into Mail (macOS)
Aditya Keerthi
Reported 2018-05-02 10:40:47 PDT
Steps To Reproduce: 1. Open https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video in Safari 2. Right click the video and select Copy Video address 3. Paste into new Mail message Results: Paste does not paste anything. Pasting into Messages and contenteditable divs works.
Attachments
Proposed fix (5.23 KB, patch)
2018-05-02 14:17 PDT, Aditya Keerthi
no flags
Patch (7.30 KB, patch)
2018-05-02 14:42 PDT, Aditya Keerthi
thorton: review+
Patch (7.25 KB, patch)
2018-05-02 15:18 PDT, Aditya Keerthi
no flags
Aditya Keerthi
Comment 1 2018-05-02 10:41:48 PDT
Aditya Keerthi
Comment 2 2018-05-02 14:17:38 PDT
Created attachment 339338 [details] Proposed fix
Aditya Keerthi
Comment 3 2018-05-02 14:42:23 PDT
Tim Horton
Comment 4 2018-05-02 15:05:26 PDT
Comment on attachment 339344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339344&action=review > Source/WebCore/platform/mac/PasteboardMac.mm:202 > - paths.append(pasteboardURL.title.stripWhiteSpace()); > + paths.append([title stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]); We should probably just use our stripWhiteSpace, not Cocoa’s. You’re going to turn it into a String soon anyway, might as well do it before that step and use more WebKit code. > Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:116 > + urls = [WebURLsWithTitles URLsFromPasteboard: [NSPasteboard generalPasteboard]]; No spaces after colons.
Aditya Keerthi
Comment 5 2018-05-02 15:18:35 PDT
WebKit Commit Bot
Comment 6 2018-05-02 15:55:50 PDT
Comment on attachment 339354 [details] Patch Clearing flags on attachment: 339354 Committed r231276: <https://trac.webkit.org/changeset/231276>
Note You need to log in before you can comment on or make changes to this bug.