Closed Bug 340090 Opened 18 years ago Closed 18 years ago

<noscript> nested links not working

Categories

(Core :: DOM: HTML Parser, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: copong, Assigned: mrbkap)

Details

(Keywords: testcase)

Attachments

(1 file)

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
Sorry, when I said "... Links always gets the <noscript> link." I meant Links, the text-only browser.
<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
Attached file 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.
Keywords: testcase
(FWIW, bug 54370 and bug 55462 suggests we do want to support this tag soup)
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

:)
Ok, thanks.

-> WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Thanks, guys.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: