Closed Bug 13068 Opened 21 years ago Closed 20 years ago

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

Categories

(Core :: DOM: Selection, defect, P4)

defect

Tracking

()

VERIFIED INVALID

People

(Reporter: mats, Assigned: mjudge)

References

(Depends on 1 open bug)

Details

(Whiteboard: [nsbeta3+])

Attachments

(1 file)

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.)
Attached file Solaris stack trace
Assignee: mjudge → akkana
Component: Selection → Editor
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.
<duh, "thorough" bug report. friday afternoon it is. ;->
OS: Windows NT → All
Hardware: PC → All
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.
adding myself a cc since i first implemented this
i am looking at this now, i think it is a combination of switching dtd's and
using the editor to display the source,
Status: NEW → ASSIGNED
Target Milestone: M15
I'll work with sford on figuring out what's going on.
Please note 13278, which may either be a subissue of this bug, or a duplicate.
Changing Component to Output.
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
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.
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
Priority: P3 → P4
Summary: Page Source delivers bad markup when copied to clipboard → Page Source delivers bad markup when copied to clipboard (generated content)
Blocks: 30462
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
this is dependent on 12460
Depends on: 12460
Target Milestone: M16 → M17
Keywords: correctness, nsbeta3
Target Milestone: M17 → M18
Blocks: 33464
adding help wanted to the keywords
Whiteboard: nsbeta3+
oops -- wrong copy string there: setting to nsbeta3+
adding brackets to status whiteboard
Whiteboard: nsbeta3+ → [nsbeta3+]
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
Closed: 20 years ago
Resolution: --- → INVALID
*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
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.