User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Mozilla prematurely wraps hyperlinks when the hyperlink appears in an HTML list that is after an <a name="foo"> tag. I will upload a simple test HTML page after I submit this bug. Reproducible: Always Steps to Reproduce: 1. Load test page in the above browser. 2. 3. Actual Results: HREF wraps prematurely. Expected Results: Mozilla should compute the length of the hyperlink based on what is between the anchor tags, and not on the href attribute value + what is between the tags. In other words, the hyperlink should not be wrapped. I have reproduced this on Linux (with Mozilla 1.0.1) and Windows 2000 (With Mozilla 1.2.1).
I should also add that if you remove the <a name="test"> link in the attached test case, the hyperlink wraps correctly.
Can you attach a screenshot of what you are seeing?
Closing the <a name="test"> tag by doing: <a name="test"></a> addresses the problem. <a name="test"/> does not, however.
<snip> Unclosed <A> tags. Yes, even <A NAME="foo"> has to have a corresponding </A>. Note that an empty <A NAME> element won't be recognized by some browsers; be sure to put at least a word or two inside the <A> </snip> Source: http://validator.w3.org/docs/errors.html#no-end-tag marking invalid
Just because the HTML is invalid doesn't mean the bug is invalid. This is a perfectly valid bug in our code that handles invalid HTML -- where we have to be compatible with the web.
(It's a parser problem because the inner link terminates the LI (but not the UL).)
*** Bug 206792 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 100930 ***