Closed Bug 253346 Opened 16 years ago Closed 11 years ago

<script> and <meta> content in <applet> tag is not ignored

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED WONTFIX

People

(Reporter: James.H.Manger, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2

The content of an <applet> tag should be ignored when the applet is supported. 
Firefox is NOT ignoring a <script> element nor a <meta> element, both of which
tell the browser to go to a new page.  Firefox is ignoring the <h1> and <p> text
elements.

If, and only if, the applet is not supported should another page to loaded.  The
<script>, <meta> and <a> elements do the same thing -- load another page.  All
are included for browsers that might only support one.  The <script> and <meta>
elements should automatically change the page, BUT ONLY IF THE APPLET IS NOT
SUPPORTED.

<applet ...>
  <param ...>

  <script type="text/javascript">location="hello.txt";</script>
  <meta http-equiv="refresh" content="0; url=ciao.txt"/>
  <h1><a href="gutentag.txt">Login</a></h1>
  <p>Your browser appears not to support Java applets, JavaScript or
  "refresh" meta tags.  Please use the above link to login.</p>
</applet>

"The content of the APPLET acts as alternate information for user agents that
don't support this element or are currently configured not to support applets.
User agents must ignore the content otherwise."
[http://www.w3.org/TR/html401/struct/objects.html]


Reproducible: Always
Steps to Reproduce:
1. Start with any page with an <applet>
2. Add one of the following lines to the content of the <applet>
  <script type="text/javascript">location="hello.txt";</script>
  <meta http-equiv="refresh" content="0; url=ciao.txt"/>
3. Browse to the page.

Actual Results:  
The page instantly switches to hello.txt (or ciao.txt if the <script> element is
absent) [or at least to an error page saying these files are not found].

Expected Results:  
The applet should run.
The <script> and <meta> tags should be ignored so the page should not change.

The relevant part of the HTML 4 specification is section 13.4 "Including an
applet: the APPLET element", http://www.w3.org/TR/html401/struct/objects.html#h-13.4

"The content of the APPLET acts as alternate information for user agents that
don't support this element or are currently configured not to support applets.
User agents must ignore the content otherwise."
This has some similarity with bug 149887.
The <script> part of this is covered by bug 60724, so marking the dependency.  I
imagine a solution to that would also fix this bug, but keeping them separate
for now.
Assignee: firefox → parser
Component: General → HTML: Parser
Depends on: 60724
Product: Firefox → Core
QA Contact: general → mrbkap
Version: unspecified → Trunk
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Attached file testcase
Keywords: testcase
Assignee: parser → mrbkap
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: mrbkap → parser
Assignee: mrbkap → nobody
Duplicate of this bug: 60724
I believe HTML5 endorses the behavior reported as a bug here. Tracking HTML5 rather than HTML4 now.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.