Closed Bug 131916 Opened 22 years ago Closed 22 years ago

HTML list, <dl>, loses formatting when cut and pasted to text or File / Save Page As... text.

Categories

(Core :: DOM: Serializers, defect, P2)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: stephen.moehle, Assigned: t_mutreja)

Details

(Whiteboard: [fixinhand][needs testing & 'a='])

Attachments

(2 files)

Copying and pasting an HTML list, <dl>, to text loses all formatting.  NN4 works
correctly.

Given a list in Mozilla like:

<dl>
<dt>Subsection 1
<dd>Item 1
<dd>Item 2
<dt>Subsection 2
<dd>Item 5
<dd>Item 6
</dl>

If I copy and paste it into a text editor like nedit or vi, it looks like:

Subsection 1
Item 1 Item 2 Subsection 2
Item 5 Item 6 

If I do the same thing using NN4, I get:

Subsection 1 
       Item 1 
       Item 2 
Subsection 2 
       Item 5 
       Item 6 

NN4's behavior seems much more desirable.

Tested with Mozilla trunk 2002-03-17-06 on Linux.
Attached file My HTML list testcase
Also happens on Win2000 (Mozilla trunk 2002-03-18-03).
Updating Platform and OS to All/All.
OS: Linux → All
Hardware: PC → All
-->DOM to Text Conversion
Component: Selection → DOM to Text Conversion
Also screws up if I save my HTML testcase as a text file ("File/Save Page As..."
and chosing type to be "Text File").
Summary: Copy and paste an HTML list, <dl>, to text loses formatting → HTML list, <dl>, loses formatting when cut and pasted to text or File / Save Page As... text.
-->module owner
Assignee: mjudge → harishd
QA Contact: tpreston → sujay
Status: UNCONFIRMED → NEW
Ever confirmed: true
--> Myself.
Assignee: harishd → tmutreja
Status: NEW → ASSIGNED
Comment on attachment 81495 [details] [diff] [review]
Patch to fix it...

Oh, yes, this is much better!  r=akkana
Attachment #81495 - Flags: review+
Comment on attachment 81495 [details] [diff] [review]
Patch to fix it...

sr=heikki
Attachment #81495 - Flags: superreview+
Taking so I can test and check in...
Assignee: t_mutreja → heikki
Status: ASSIGNED → NEW
Priority: -- → P2
Whiteboard: [fixinhand]
Target Milestone: --- → mozilla1.1alpha
Status: NEW → ASSIGNED
Whiteboard: [fixinhand] → [fixinhand][needs testing & 'a=']
Target Milestone: mozilla1.1alpha → mozilla1.2alpha
Waiting for some action...
I've targeted this for 1.2 alpha, since I don't have time to test this right
now. If you want, you can take this to check it in.
Back to Tanu...
Assignee: heikki → t_mutreja
Status: ASSIGNED → NEW
Target Milestone: mozilla1.2alpha → ---
The patch passes all the test case I tried, so asking for approval.
Tanu, check what it says on Tinderbox. Currently approval is not required for
the trunk. So once the tree opens you can check in.
Checked in to TRUNK.
nsPlainTextSerializer.cpp
09/16/2002 22:41 
Rev:1.65 
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Verifying fixed.  Tested with Mozilla 2002-09-17-09 trunk on Linux and
2002-09-17-08 trunk on Windows 2000 and XP.  Works fine both copying to the
clipboard and pasting as text and saving (File/Save As) as text.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: