Closed
Bug 309712
Opened 20 years ago
Closed 20 years ago
HTML-style comments in the middle of .js file cause part of script to be ignored (treated as XML data)
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla1.8beta5
People
(Reporter: jruderman, Assigned: brendan)
References
()
Details
(Keywords: fixed1.8, js1.6, regression)
Attachments
(2 files)
|
8.00 KB,
text/ecmascript
|
Details | |
|
1.13 KB,
patch
|
mrbkap
:
review+
shaver
:
superreview+
brendan
:
approval1.8b5+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b5) Gecko/20050922
Firefox/1.4
Steps to reproduce:
1. Hover one of the equipment icons in
http://www.thottbot.com/index.cgi?p=Aydsnizzeth.
Result: Nothing happens.
Expected: Info box should appear.
Regression from bug 309242, "E4X should be on by default, while preserving the
comment hiding hack".
Identified by MozillaZine Forum member bizarrojack in
http://forums.mozillazine.org/viewtopic.php?t=321123.
| Reporter | ||
Comment 1•20 years ago
|
||
I guess we can...
(1) Back out bug 309242 and go back to requiring opt-in for E4X.
(2) Ask sites that use HTML-style comments in strange ways to change their code.
(3) Change the heuristic introduced by bug 309242 to handle this case as the
author intended. For example, treat "<!--" as the beginning of XML comment data
iff it does not occur at the beginning of a statement.
Brendan, is (3) realistic?
| Reporter | ||
Comment 2•20 years ago
|
||
Copy of http://i73.thottbot.com/js/wow.js.
| Assignee | ||
Comment 3•20 years ago
|
||
The heuristic is there just to spare people from having to select an E4X
version, via e4x=1, version=1.6, or better than these ineffective MIME type
parameters on application/javascript, perhaps the application/e4x MIME type
that Chris Lilley is proposing.
So if the heuristic is hurting, make it conservative, which may at the margin
require some E4X users to do the right thing, anyway, and request the MIME type
they require.
/be
Attachment #197152 -
Flags: superreview?(shaver)
Attachment #197152 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•20 years ago
|
Assignee: general → brendan
Flags: blocking1.8b5+
Comment 4•20 years ago
|
||
Comment on attachment 197152 [details] [diff] [review]
Use a more conservative heuristic
Bah!
r=mrbkap
Attachment #197152 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Updated•20 years ago
|
Keywords: js1.6
OS: MacOS X → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8beta5
Comment 5•20 years ago
|
||
Comment on attachment 197152 [details] [diff] [review]
Use a more conservative heuristic
sr=shaver, though I'll also ping the Thottbot guys to fix their script!
Attachment #197152 -
Flags: superreview?(shaver) → superreview+
| Assignee | ||
Updated•20 years ago
|
Attachment #197152 -
Flags: approval1.8b5+
| Assignee | ||
Comment 6•20 years ago
|
||
Fixed on trunk and branch.
/be
| Assignee | ||
Comment 7•20 years ago
|
||
*** Bug 309806 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 8•20 years ago
|
||
*** Bug 309778 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 9•20 years ago
|
||
*** Bug 309802 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.
Description
•