New issue
Advanced search Search tips

Issue 615748 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 464560
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Cannot copy Strings that contain URLs from the console

Reported by sgood...@atlassian.com, May 30 2016

Issue description

Chrome Version       : 50.0.2661.102
OS Version: OS X 10.11.4 (same bug exits on Windows 10)
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5:
  Firefox 43.0.4: Doesn't alter the URL. 
     IE 7/8/9:

What steps will reproduce the problem?
1. Open DevTools
2. console.log(JSON.stringify({url: 'http://google.com?this_param_is_long=asdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdas', key: 'value'}));
3. Double click the text line
4. Cmd+C to copy the value.
5. Cmd+V somewhere else to see what you copied.

What is the expected result?
I copied a string that looks like
{"url":"http://google.com?this_param_is_long=asdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdas","key":"value"}


What happens instead of that?
I copied a string that looks like
{"url":"http://google.com?this_param_is_long=asdasdasdasasdasdasdasasdasdasdasasdas…asdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdasasdasdasdas","key":"value"}


UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36



 
Screen Shot 2016-05-30 at 1.23.52 PM.png
26.9 KB View Download

Comment 1 by samli@chromium.org, May 30 2016

Cc: paulir...@chromium.org dgozman@chromium.org
Components: Platform>DevTools
Labels: -OS-Mac OS-All
Owner: l...@chromium.org
Status: Available (was: Unconfirmed)
Reproed M51. I think in this case we should either:
a) not use the URL shorteners, or
b) have copy ensure it expands the URLs again.
We linkify (and shorten) urls so that callstacks there are clickable. Having a custom copy function here is feasible, but not the top priority.

Comment 3 by l...@chromium.org, May 31 2016

Mergedinto: 464560
Status: Duplicate (was: Available)
> We linkify (and shorten) urls so that callstacks there are clickable.

Everyone seems to have a concern when we do this to URL that were logged, not ones attached to the callstack of a log/error. Seems possible to provide a nice readable callstack and never elide the text that was logged by the user.

Sign in to add a comment