Closed Bug 241367 Opened 18 years ago Closed 18 years ago

Spurious line break in first ordered list line to contain a link/anchor.


(SeaMonkey :: General, defect)

Windows XP
Not set


(Not tracked)



(Reporter: k, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421

In the first ordered list on the page,, notice that Mozilla inserts a
line break between the unlinked and linked text. I've experimented and found
that it adds the spurious line break always right before the first link in the
ordered list, be it in the first item or further down. Subsequent items in the
list behave as expected as you can see.

Reproducible: Always
Steps to Reproduce:
1. Create an ordered list.
2. In two of the list items, include a hyperlinked word.

Actual Results:  
The first occurance of a linked word will have an unintended line break just
before the link.

Expected Results:  
Only break lines between list items or other block delimitters.
The markup is:

<a name="whatever">
  <li> Text <a href="something"> More text </a> </li>

Now this is not valid HTML, since an <a> element may not contain another <a>
element (and may not contain <ul> either).  So the parser fixes it up to:

  <a name="whatever">
    <li> Text </li>
  <a href="something"> More text </a>

See where the linebreak is coming from?

This is already filed...
Whiteboard: DUPEME
this also occurs with the xhtml format: <a name="whatever" />
This also resets the font size (and probably other things) at the point of the
line break.  See, for instance:
And note that the page:
Is valid xhtml, without &lt;a&rt; elements embedded in other &lt;a&rt; elements.
Product: Browser → Seamonkey

*** This bug has been marked as a duplicate of 167467 ***
Closed: 18 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You've marked this bug as a duplicate of a bug marked "RESOLVED INVALID" - but
this bug is NOT resolved nor is it invalid (it still exists in current versions
of Mozilla/Firefox, and it happens even when displaying a page that uses valid
XHTML/CSS).  I recommend either reopening this bug, or reopening Bug 167467.
You need to log in before you can comment on or make changes to this bug.