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




20 years ago
19 years ago


(Reporter: mats, Assigned: mjudge)


(Depends on: 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [nsbeta3+])


(1 attachment)



20 years ago
To repeat:
1. Load (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)

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.)

Comment 1

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


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

Comment 2

20 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

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


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

Comment 4

20 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

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

Comment 6

20 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,


20 years ago
Target Milestone: M15

Comment 7

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

Comment 8

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

Comment 9

20 years ago
Changing Component to Output.

Comment 10

20 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

19 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

19 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
Component: Output → Selection


19 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)


19 years ago
Blocks: 30462

Comment 13

19 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
Target Milestone: M15 → M16

Comment 14

19 years ago
this is dependent on 12460
Depends on: 12460
Target Milestone: M16 → M17


19 years ago
Keywords: correctness, nsbeta3
Target Milestone: M17 → M18


19 years ago
Blocks: 33464

Comment 15

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

Comment 16

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

Comment 17

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

Comment 18

19 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 
Last Resolved: 19 years ago
Resolution: --- → INVALID

Comment 19

19 years ago
*SPAM*: Changing the QA contact of all open/resolved Selection bugs from to  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 
QA Contact: elig → BlakeR1234

Comment 20

19 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
You need to log in before you can comment on or make changes to this bug.