Closed Bug 139466 Opened 22 years ago Closed 22 years ago

Copy and Paste in Composer can generate invalid markup

Categories

(Core :: DOM: Editor, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla1.1alpha

People

(Reporter: glazou, Assigned: mozeditor)

References

Details

(Whiteboard: EDITORBASE+ fixinhand [adt2 RTM] [ETA 06/27])

Attachments

(1 file)

1. launch Composer
2. type some chars
3. select "Header 1" from pulldown format menu
4. Select all
5. Copy
6. Paste 3 times

Expected result : three identical H1 elements, all children of BODY
Result          : three **nested** H1

This is very invalid markup and serious end-user problem.
Tested with
confirming with 2002042209
when pasting into a new line it works as it should... don't know if it's invalid
markup, but it definitely isn't the expected result. (and it works for other
things like <a>)
our dtd must be telling us it's ok to put an h1 in an h1.  If thats wrong this
is an easy fix.  If thats right then this isn't a bug at all.
Status: NEW → ASSIGNED
checking the spec shows that this is indeed wrong.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 142602 has been marked as a duplicate of this bug. ***
I am still seeing this problem with the 05-09 trunk build.

Following original steps, I am still getting nested H1 tags.

I am reopening this bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
hmm.  I believe I marked it fixed by accident to start with.  The comment I made
at the time acknowledges it is a real bug.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla1.1alpha
nominating.
Keywords: nsbeta1
Whiteboard: EDITORBASE
Whiteboard: EDITORBASE → EDITORBASE+
Keywords: nsbeta1nsbeta1+
As I suspected this was a dtd issue.  I altered the strict dtd to prevent
headings from containing other headings.
need r and sr
Whiteboard: EDITORBASE+ → EDITORBASE+ fixinhand need r=;sr=
Whiteboard: EDITORBASE+ fixinhand need r=;sr= → EDITORBASE+ fixinhand need r=;sr= [adt2]
cc harishd to review
cc jst to super-review
Attachment #85994 - Flags: review+
Comment on attachment 85994 [details] [diff] [review]
patch to COtherElement.h

add space around '='. With that r=harishd
I will gladly put spaces around the "=" (which I prefer as well) but you may want 
to not that the rest of the file is filled with the opposite style.  :-)
Comment on attachment 85994 [details] [diff] [review]
patch to COtherElement.h

sr=jst
Attachment #85994 - Flags: superreview+
Joe: The author of the code is not with netscape anymore and when the code was
written coding conventions weren't followed strictly :-/
Whiteboard: EDITORBASE+ fixinhand need r=;sr= [adt2] → EDITORBASE+ fixinhand [adt2]
fix landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Keywords: adt1.0.1
shrir - can you pls verify this fixed on the trunk? thanks!
Blocks: 143047
Whiteboard: EDITORBASE+ fixinhand [adt2] → EDITORBASE+ fixinhand [adt2 RTM] [ETA 06/27]
Removing nsbeta1+, adt1.0.1, mozilla1.0.1. The fix is too risky for the 1.0 branch.
QA Contact: sujay → sairuh
vrfy'd fixed on win2k and linux rh8.0 (2003.03.03.05) and mac 10.2.4
(2003.02.28.10) with comm trunk bits.
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: