Invalid markup generated when creating two adjacent links

NEW
Assigned to

Status

()

Core
Editor
--
major
15 years ago
11 years ago

People

(Reporter: glazou, Assigned: glazou)

Tracking

({topembed+})

Trunk
mozilla1.5beta
topembed+
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [adt2] EDITORBASE+)

Attachments

(2 attachments)

(Assignee)

Description

15 years ago
Reproduced with trunk build 20021023 and NS7.0

1. launch Composer
2. type   aaabbbbcccc
3. select all the "c" characters
4. create a link, target "c"
5. then select all the "b" characters
6. create a link, target "b"

Expected result:
   aaa<a href="b">bbbb</a><a href="c">cccc</a>

Actual result:
   aaa<a href="c"><a href="b">bbbb</a>cccc</a>

Hint: the HTML4 content model for A excludes A (section 12.2 of spec)

  <!ELEMENT A - - (%inline;)* -(A) -- anchor -->
(Assignee)

Comment 1

15 years ago
nominating EB
Whiteboard: EDITORBASE
(Assignee)

Comment 2

15 years ago
Created attachment 103968 [details] [diff] [review]
Joe, is this simple patch the correct way to fix this bug ?
(Assignee)

Comment 3

15 years ago
Created attachment 103970 [details] [diff] [review]
better, cleaner ; Joe, same question ?
EDITORBASE+. nsbeta1+
Keywords: nsbeta1+
Whiteboard: EDITORBASE → EDITORBASE+

Comment 5

15 years ago
I've discussed this with Daniel.  I'm worried this fix will disable merging of
like styles in some cases.  

I think the core issue is that we are putting in the <a> tags before we have the
href.  Offhand I can't think of any good reason for that.  So I suggest we look
into changing that, which should have the effect of fixing this bug.

Updated

15 years ago
Target Milestone: --- → M1
QA Contact: sujay → sairuh

Comment 6

15 years ago
EDITORBASE+ topembed+ normalization
Keywords: topembed+

Updated

15 years ago
Target Milestone: M1 → mozilla1.5beta

Comment 7

15 years ago
adt: nsbeta1+/adt2
Whiteboard: EDITORBASE+ → [adt2] EDITORBASE+
Daniel can you take a look. 
Assignee: jfrancis → glazman
QA Contact: bugzilla → editor
You need to log in before you can comment on or make changes to this bug.