Prettify plaintext copy format of headers

RESOLVED FIXED in Firefox 55

Status

P3
normal
RESOLVED FIXED
2 years ago
9 months ago

People

(Reporter: aryx, Assigned: Vera, Mentored)

Tracking

({good-first-bug})

unspecified
Firefox 55
good-first-bug

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Nightly 54.0a1 2017-02-25

1. Open The console.
2. Load a web page.
3. Click on the url in the console.
4. In the right sidebar of the netmonitor, select several lines of the headers.
5. Copy them.
6. Paste them somewhere.

Actual result:
Example:
X-Content-Type-Options	
"nosniff"
[Learn More]
X-Frame-Options	
"DENY"
[Learn More]

Expected result: e.g.
X-Content-Type-Options: nosniff
X-Frame-Options	: DENY
Thanks for the report!

I think that we can use `moz-user-select: none;` (or `user-select: none;` ?) to disable selection for the '[learn more]' link.

Here is the place where the lear-more link is created.
https://dxr.mozilla.org/mozilla-central/rev/7ef1e9abd296a8edc39b7efc8d637767ba2f77ed/devtools/client/netmonitor/shared/components/mdn-link.js#22


Honza
Mentor: odvarko
Keywords: good-first-bug
Priority: -- → P3
Eduardo: perhaps this is simple to fix?

Honza
Flags: needinfo?(mail)

Comment 3

2 years ago
(In reply to Jan Honza Odvarko [:Honza] from comment #2)
> Eduardo: perhaps this is simple to fix?
> 
> Honza

Yes, it should be a quick fix. I'll work on a patch.

Updated

2 years ago
Flags: needinfo?(mail)

Comment 4

2 years ago
Hi, this looks like a relatively good first bug and i'd like to take a look if nobody is currently working on it.
(Assignee)

Comment 5

2 years ago
Hello! 

I've been taking a look at this bug for a few days and I've disabled the selection for the Learn More link. The WIP patch is attached and the results are as follows,


Before:

Host	
"buzzfeed.com"
[Learn More]
User-Agent	
"Mozilla/5.0 (X11; Linux x86_6… Gecko/20100101 Firefox/54.0"
[Learn More]
Accept	
"text/html,application/xhtml+x…lication/xml;q=0.9,*/*;q=0.8"
[Learn More]

After:

Host	
"buzzfeed.com"
User-Agent	
"Mozilla/5.0 (X11; Linux x86_6… Gecko/20100101 Firefox/54.0"
Accept	
"text/html,application/xhtml+x…lication/xml;q=0.9,*/*;q=0.8"



Is this acceptable? If it is, can someone point me to the right direction on how to prettify this further?
Looks good to me.

We need a commit message in the patch yet.

Thanks for working on this!

Honza
Assignee: nobody → josh.pinkney
(Assignee)

Comment 8

2 years ago
Hello Honza,

I noticed that you assigned someone else to the bug even though I fixed it (see comment 5). I'd appreciate it if you could change the assignee to me. Thanks! 

And thank you for the link - I'll add a commit message and upload the patch.
(Assignee)

Comment 9

2 years ago
Posted patch bug-1342706-prettify.patch (obsolete) — Splinter Review
I've added a commit message to the patch. I'm a bit new to Mercurial; is the patch correctly formatted?
Attachment #8843525 - Flags: review?(odvarko)
> Hello Honza,
> 
> I noticed that you assigned someone else to the bug even though I fixed it
> (see comment 5). I'd appreciate it if you could change the assignee to me.
Ah, sorry, fixed.

Honza
Assignee: josh.pinkney → vera.sipicki
Comment on attachment 8843525 [details] [diff] [review]
bug-1342706-prettify.patch

Review of attachment 8843525 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the patch!
> Bug 1342706 - Disabled text selection for learn-more-link in order to prettify copied header responses r=Jan Honza Odvarko
Please change reviewer name to: Honza

Should be:
Bug 1342706 - Disabled text selection for learn-more-link in order to prettify copied header responses; r=Honza

Thanks,
Honza
Attachment #8843525 - Flags: review?(odvarko)
(Assignee)

Comment 12

2 years ago
Thank you for your patience! Edited as requested.
Attachment #8843525 - Attachment is obsolete: true
Great, thanks!

Honza
Keywords: checkin-needed

Comment 14

2 years ago
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/06cbae69ee84
Disabled text selection for learn-more-link in order to prettify copied header responses; r=Honza
Keywords: checkin-needed

Comment 15

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/06cbae69ee84
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55

Updated

9 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.