Closed
Bug 324996
Opened 19 years ago
Closed 19 years ago
<script ... /> not recognized
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 203398
People
(Reporter: kieran, Assigned: mrbkap)
Details
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050702 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050702 gecko doesn't parse <script ... /> as equivalent to <script ...></script> for example, here's a <head> block that loads some abc.css markup, after loading a .js library: <head> <script type="text/javascript" src="abc.js" /> <link href="abc.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> /* <![CDATA[ */ <!-- --> /* ]]> */ </script> <title>title</title> </head> however, because the <script ... /> syntax is overlooked, the css is never loaded, and everything until the final </script> is ignored. in contrast, this version works: <head> <script type="text/javascript" src="abc.js"></script> <link href="abc.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> /* <![CDATA[ */ <!-- --> /* ]]> */ </script> <title>title</title> </head> thanks. Reproducible: Always Steps to Reproduce: 1.save the described html blocks in separate files 2.load each file 3.view the mozilla page source, ie, ctrl-U, and note the difference in syntax coloration
Comment 1•19 years ago
|
||
(Q1) What "Content-Type:" header is sent by server? Go http://livehttpheaders.mozdev.org/index.html and install LiveHTTPHeadrs. (Q2) What "<!DOCTYPE" is written in the web document? (Q3) What "<meta http-equiv" are written in the web document?
Comment 2•19 years ago
|
||
See Bug 305873 for issues when malformed or missing </script> tag in HTML.
Comment 3•19 years ago
|
||
If you're not properly serving up valid xhtml you can't use <tag/> ==> parser
Assignee: general → mrbkap
Component: General → HTML: Parser
Product: Mozilla Application Suite → Core
QA Contact: general → parser
Version: unspecified → 1.8 Branch
Comment 4•19 years ago
|
||
Reporter, see Bug 233093 and Bug 203398, if you are creating XHTML document instead of HTML document.
Reporter | ||
Comment 5•19 years ago
|
||
going back to the original doc itself (http://ccls.sfsu.edu:8081/IndexedView?url=http://hedgehog.sfsu.edu/genes/190.html), the content-type string is Content-Type: text/html;charset=ISO-8859-1 and the <html> tag looks like this: <html xmlns="http://www.w3.org/1999/xhtml"> there is no <!DOCTYPE, nor are there <meta http-equiv meta tags.
Assignee | ||
Comment 6•19 years ago
|
||
Kieran, you need to serve your XHTML as application/xhtml+xml for us to respect things like the empty tag syntax. There are several places that google knows that can explain how to make both IE and Mozilla happy with your XHTML (as far as mime types are concerned). *** This bug has been marked as a duplicate of 203398 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•