New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 668591 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Console Color Output And Resource URLS

Reported by timothy....@gmail.com, Nov 25 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.59 Safari/537.36

Steps to reproduce the problem:
1. Break a resource URL (url:line:column) into the various pieces
2. Log into the console using '%c' formatting for the individual pieces
3. Attempt to click on the resource URL in the console

What is the expected behavior?
The user should be able to click on the resource url

What went wrong?
Due to the inclusion of %c characters, the devtools parser no longer sees the color formatted urls properly.  

Did this work before? No 

Chrome version: 55.0.2883.59  Channel: beta
OS Version: OS X 10.12.0
Flash Version: 

There is some potential for this to be a security risk, but at the same time, allowing for background images and transparent text allows for the same level of risk.
 
Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
Hello,

I would like to contribute, and this looks like a good candidate for a first issue. What is the process around issue resolving?
I've read contribute guide doc and have dev env set up and ready. Contribution guide does not give much details on how issues assigned/selected. 

Comment 3 by l...@chromium.org, Dec 1 2016

Cc: chenwilliam@chromium.org
Thanks for the report, OP.  To make sure I understand what you've described, I've attached a screenshot.  It sounds to me like the issue is the first, colorful result should linkify the entire string "www.google.com:123:456", just like how the second result is completely linkified.  If this isn't correct, please let us know.

anton@, we would love to see contributions!  Please feel free to get started.  As for issue assignment, @chenwilliam, do you know if we're supposed to set external contributors' emails in the 'Owner' field?
consoleColorFormatPieces.png
14.3 KB View Download
That is correct.  And to be more explicit, something like:

console.log("%chttp://%cwww.google.com%c:80%c/%c:123%c:456", "color:lightgray", "color:blue", "color:orange", "color:lightgray", "color:green", "color:red");

Should be entirely linkable, but only www.google.com is a link.

Comment 5 by l...@chromium.org, Dec 1 2016

Thanks for confirming Timothy.

@Anton, I will stay as the issue owner for now, but you can feel free to start.
 You might already be familiar, but just in case, checking out the _format() and _formatWithSubstitutionString() functions in ConsoleViewMessage.js would be a good place to look!
Thank you for a hint, I'll start shortly, and will keep you updated. 
Wanted to follow up and see if any progress has been made on this?  If not, is there room for me to take a look at fixing it?

Comment 8 by l...@chromium.org, May 4 2017

It's been awhile, but please take a look the thread on this CL review first: https://codereview.chromium.org/2568983003/

Ideally, the existing UI.highlightRangesWithStyleClass could be refactored and repurposed for this use case, but it looks like doing so without adding much code complexity is non-trivial.

I appreciate your interest!  For other candidate bugs, you could try to find one labeled with hotlist=polish:
https://bugs.chromium.org/p/chromium/issues/list?can=2&q=Hotlist%3DPolish+component%3APlatform>DevTools+

Comment 9 by l...@chromium.org, Dec 7 2017

Status: Archived (was: Assigned)
This request has been open for awhile, and with our current priorities, it does not seem like it will be fixed soon.  Archiving this for now.

Sign in to add a comment