A inside LI inside preceded by unclosed A closes the LI (but not the UL)

RESOLVED DUPLICATE of bug 100930

Status

()

Core
HTML: Parser
P2
normal
RESOLVED DUPLICATE of bug 100930
15 years ago
15 years ago

People

(Reporter: Richard Li, Assigned: harishd)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
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).
(Reporter)

Comment 1

15 years ago
Created attachment 109362 [details]
This is a test case that illustrates the problem.
(Reporter)

Comment 2

15 years ago
I should also add that if you remove the <a name="test"> link in the attached
test case, the hyperlink wraps correctly.
(Reporter)

Updated

15 years ago
OS: Windows 2000 → All
Can you attach a screenshot of what you are seeing?
(Reporter)

Comment 4

15 years ago
Created attachment 114134 [details]
Screenshot showing problem on Windows

Mozilla 1.2.1 on Windows.

Updated

15 years ago
Priority: -- → P2
(Reporter)

Comment 5

15 years ago
Closing the <a name="test"> tag by doing: <a name="test"></a> addresses the
problem. <a name="test"/> does not, however.

Comment 6

15 years ago
<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
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → 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.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
->Parser.
Assignee: other → harishd
Component: Layout → Parser
QA Contact: ian → dsirnapalli
(It's a parser problem because the inner link terminates the LI (but not the UL).)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: href links not wrapped correctly when after name anchor tag → A inside LI inside preceded by unclosed A closes 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 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.