Closed Bug 295596 Opened 20 years ago Closed 20 years ago

Regression: <a><li>foo</li></a> no longer linked

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sno35, Assigned: mrbkap)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+

Some old local docs contain html code with inversed "a" and "li" tags.
Instead of
li a ... /a /li
it has
a li ... /li /a
Firefox 1.0.4 can render both OK while Deer Park renders as link just the logical
(at least in my opinion) one, the first.


Reproducible: Always

Steps to Reproduce:
1. Create a simple page with a list of links where "a" and "li" are in reverse
containment ( "li" inside "a")
2. Try to follow the link
3.

Actual Results:  
Text rendered, not as link

Expected Results:  
Text rendered, as link. Or was it just a hidden feature from Firefox, so far ?

How do one quotes code here ?
Pass: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050519
Firefox/1.0+

Fail: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050520
Firefox/1.0+

Probably fallout from the 2005-05-19 09:36 checkin for bug 38174.

--> HTML: Parser
Assignee: nobody → parser
Status: UNCONFIRMED → NEW
Component: General → HTML: Parser
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → mrbkap
Version: unspecified → Trunk
Attached file testcase
Reporter:
The best way to give HTML examples is to attach a minimal testcase to the bug.
Keywords: testcase
Attached patch patch v1Splinter Review
For no reason that I understand, we close transient styles that cannot contain
the container that we're trying to open them for. This is incorrect for <li>
because of cases like this, where we're trying to open styles that the author
wanted to apply to the children of the <li>.

This is, IMO, the safest solution. I disable the weird behavior for <li>, but
not for anything else, so there should be no side effects.
Assignee: parser → mrbkap
Status: NEW → ASSIGNED
Attachment #184602 - Flags: review?(bzbarsky)
Blocks: 38174
Attachment #184602 - Flags: review?(bzbarsky) → review+
Attachment #184602 - Flags: superreview?(jst)
> Reporter:
> The best way to give HTML examples is to attach a minimal testcase to the bug.

OK, noted. Thanks.
Comment on attachment 184602 [details] [diff] [review]
patch v1

sr=jst
Attachment #184602 - Flags: superreview?(jst) → superreview+
Comment on attachment 184602 [details] [diff] [review]
patch v1

This is a safe fix for a recent regression.
Attachment #184602 - Flags: approval1.8b3?
Summary: Deer Park alpha 1 misses listed links firefox 1.0.4 renders ok. → Regression: <a><li>foo</li></a> no longer linked
Comment on attachment 184602 [details] [diff] [review]
patch v1

a=shaver
Attachment #184602 - Flags: approval1.8b3? → approval1.8b3+
Fix checked in. Thanks for the nice testcase.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 297913 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: