Page Source delivers bad markup when copied to clipboard (generated content)

VERIFIED INVALID

Status

()

Core
Selection
P4
normal
VERIFIED INVALID
18 years ago
17 years ago

People

(Reporter: mats, Assigned: mjudge)

Tracking

(Depends on: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+])

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
To repeat:
1. Load http://www.w3.org (or any page of your choice)
2. Click menu-item View -> Page Source
3. Select the text. Here's how I did it:
   Scroll to the bottom, click to the right of "</HTML>" and drag left and keep
   dragging left (even outside window) until the content is selected.
4. Click menu-item Edit -> Copy
5. Paste into the text editor of your choice (emacs 20.4 in my case)

Observations:
All start and end tags have a space after the initial "<".
All named entities have a space between the "&" and the name, e.g. "& reg;".
Line breaks are converted to space. Tabs are converted to 8 spaces.
There is an extra space after all end tags and most of the named entities.
The HTML end tag is not properly closed (I get "< /HTML" but no ">").
There is a space between attribute names and the "=".
The CONTENT attribute name in the META tags are missing, for example:
< META http-equiv ="Content-Type" ="text/html; charset=iso-8859-1">

Version and OS:
Nightly build 1999-09-01-09-M10 on Windows NT. (Also tried on Aug 31. build on
Sun/solaris 2.6/sparc and it core dumped, I will attach a stack trace.)
(Reporter)

Comment 1

18 years ago
Created attachment 1522 [details]
Solaris stack trace

Updated

18 years ago
Assignee: mjudge → akkana
Component: Selection → Editor

Comment 2

18 years ago
mats, this is an excellent and through bug report; thank you!

Reassigning to Akkana; reproduced on 1999 9/2/99 Mac OS build. Akkana, I'll play
around with this a bit in the next few minutes.

Comment 3

18 years ago
<duh, "thorough" bug report. friday afternoon it is. ;->

Updated

18 years ago
OS: Windows NT → All
Hardware: PC → All

Comment 4

18 years ago
BTW, I copied some HTML to a foo.txt file, loaded it within Mozilla, copied it,
and pasted it to a text editor (BBEdit), and it didn't result in the below-
described problem.

This only occurs from View Source.

Comment 5

18 years ago
adding myself a cc since i first implemented this

Comment 6

18 years ago
i am looking at this now, i think it is a combination of switching dtd's and
using the editor to display the source,

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M15

Comment 7

18 years ago
I'll work with sford on figuring out what's going on.

Comment 8

18 years ago
Please note 13278, which may either be a subissue of this bug, or a duplicate.

Comment 9

18 years ago
Changing Component to Output.

Comment 10

18 years ago
Currently the clipboard isn't working at all (Build: 1999110911) , so I can't
test this theory. But, this looks a lot like a bug that I reported earlier that
is now fixed. Check bug 16175

Comment 11

18 years ago
MozMacM14 (01.28.2000) shows similar problem - text is copied w/o the brackets "<>" and line breaks are represented by spaces.  Copying 
from Page Source window unusable.

Comment 12

18 years ago
Selection basically doesn't work in the view source window, because view source
was implemented using generated content, which we don't know how to support in
selection.  This is a problem Mike Judge is working on.  
Assignee: akkana → mjudge
Status: ASSIGNED → NEW
Component: Output → Selection

Updated

18 years ago
Priority: P3 → P4
Summary: Page Source delivers bad markup when copied to clipboard → Page Source delivers bad markup when copied to clipboard (generated content)

Updated

18 years ago
Blocks: 30462
(Assignee)

Comment 13

18 years ago
hmm yes we need to make the iterators for copy/serialize to use the new 
generatedcontent iterators. I will talk to akkana about this. m16
Status: NEW → ASSIGNED
Target Milestone: M15 → M16

Comment 14

18 years ago
this is dependent on 12460
Depends on: 12460
Target Milestone: M16 → M17
(Assignee)

Updated

18 years ago
Keywords: correctness, nsbeta3
Target Milestone: M17 → M18
(Assignee)

Updated

18 years ago
Blocks: 33464

Comment 15

18 years ago
adding help wanted to the keywords
Whiteboard: nsbeta3+

Comment 16

18 years ago
oops -- wrong copy string there: setting to nsbeta3+

Comment 17

18 years ago
adding brackets to status whiteboard
Whiteboard: nsbeta3+ → [nsbeta3+]

Comment 18

18 years ago
We no longer use the same View Source strategy as we used to (like the 
Browser), so we no longer have any generated content and this problem goes 
away.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID

Comment 19

17 years ago
*SPAM*: Changing the QA contact of all open/resolved Selection bugs from 
elig@netscape.com to BlakeR1234@aol.com.  After the many great years of service 
Eli has given to Mozilla, it's time for him to move on; he has accepted a 
position at Eazel.  We'll be sad to see him go, and I'll do my best to fill his 
spot...
QA Contact: elig → BlakeR1234

Comment 20

17 years ago
Yep, View Source is no longer generated content and clipboard copying works 
fine on mac, win32 and linux (today's builds) -- verified fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.