<noscript> nested links not working

RESOLVED WORKSFORME

Status

()

Core
HTML: Parser
RESOLVED WORKSFORME
12 years ago
12 years ago

People

(Reporter: Luis Pabon, Assigned: mrbkap)

Tracking

({testcase})

1.8 Branch
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

Consider the following code:

<a href="#" onclick="javascript:openArticle('index.php?article=2');return false;">
	<noscript><a href="index.php?article=2" target="_blank"></noscript>
		read more
	<noscript></a></noscript>
</a>

The purpose is that non-js browsers would use the link inside the <noscript> tags, instead of the first one that triggers an onclick event. JS browsers would use the parent link instead.

With JS activated, FFox works as I expected (uses the link with the javascript), but it still uses the link with the javascript when JS is disabled.

This is working properly in other browsers, such as Opera (js disabled) and IE 6 (js disabled). Links always gets the <noscript> link.

Reproducible: Always

Steps to Reproduce:
1. Create an html file with the code below
2. JS enabled, try it (works - it uses the parent link)
3. JS disabled, try it (doesn't work, still uses the parent link)

Actual Results:  
FFox with disabled JS uses the parent link.

Expected Results:  
FFox should use the nested <noscript> link inside the parent link, IMO
(Reporter)

Comment 1

12 years ago
Sorry, when I said "... Links always gets the <noscript> link." I meant Links, the text-only browser.

Comment 2

12 years ago
<noscript> is an HTML tag, not a preprocessor macro!
Assignee: nobody → mrbkap
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Version: unspecified → 1.8 Branch

Comment 3

12 years ago
Created attachment 224196 [details]
Testcase #1

I can reproduce the problem in Firefox 1.5, but it works fine in the the latest
Firefox and SeaMonkey trunk builds on Linux.
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-trunk/

Luis, please test the latest trunk build and confirm. Thanks.

Updated

12 years ago
Keywords: testcase

Comment 4

12 years ago
(FWIW, bug 54370 and bug 55462 suggests we do want to support this tag soup)
(Reporter)

Comment 5

12 years ago
Mats: I can confirm that the situation is solved in the latest trunk build:
  * JS on: parent link is used
  * JS off: <noscript> link is used

:)

Comment 6

12 years ago
Ok, thanks.

-> WORKSFORME
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 7

12 years ago
Thanks, guys.
You need to log in before you can comment on or make changes to this bug.