Closed
Bug 502124
Opened 15 years ago
Closed 6 years ago
inline styles ignored using Content-Style-Type of "text/ccs" (sic)
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 1456074
People
(Reporter: matthieu, Unassigned)
References
()
Details
(Keywords: html5, Whiteboard: [html5])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5 Firefox (no other browser) stop to read the css code if an old meta tag is present. This could be very dangerous if on a website, security is formatted with CSS (exemple : a zone administration using a widget of dreamweaver spry, ajax or ...) Reproducible: Always Steps to Reproduce: 1. Go to http://www.matzikproduction.com/Firefox_bug/firefix_bug_demonstration.php to see the exempke ! 2. 3. Actual Results: Firefox don't respect the css layout Expected Results: Respect layout !! I solved the problem : Try this code (Click here to see the demo page with bug :http://www.matzikproduction.com/Firefox_bug/bad_code.php) : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title</title> <meta http-equiv="Content-Style-Type" content="text/ccs"/> </head> <body> <div style="width:500px; margin:auto; background-color:#FFFFCC">Hello World</div> </body> </html> The layout isn't respected. The problem come from (Click here to see the demo page without bug : http://www.matzikproduction.com/Firefox_bug/correct_code.php): <meta http-equiv="Content-Style-Type" content="text/ccs"/> If this tag is present in the header of a page, Firefox does not interpret the CSS (the one that is not declared in the tag header) example: the code created by TinyMCE! With other browsers the code works !! This could be very dangerous if on a website, security is formatted with CSS (exemple : a zone administration using a widget of dreamweaver spry, ajax or ...)
Comment 1•15 years ago
|
||
I believe we're following the spec: http://www.w3.org/TR/REC-html40/present/styles.html#default-style The whole point of that header is so browsers don't blindly assume "text/css", allowing different style languages to be used in the future. Therefore if it's present we should trust it. Firefox knows nothing of a "test/ccs" style language so it ignores that stylesheet. Are other browsers simply ignoring the standard meta tag, or is the "text/ccs" typo so prevalent they correct for it? Perhaps a mixture of both. Is that typo part of TinyMCE or something on your part? What version of TinyMCE? If missing style information is a security problem you're probably doing something wrong.
Group: core-security
Component: Security → Style System (CSS)
Product: Firefox → Core
QA Contact: firefox → style-system
Updated•15 years ago
|
Summary: Firefox 3 all version css crashed ! Very dangerous. Firefox stop to read css with a special meta tag → Firefox doesn't process Content-Style-Type of "text/ccs" (sic)
Comment 2•15 years ago
|
||
BTW, HTML5 parser (setting html5.enable to true via about:config) will "fix" the problem. And it is also a correct behavior. HTML5 doesn't consider the non-CSS style attribute. http://www.whatwg.org/specs/web-apps/current-work/#the-style-attribute Moreover, Content-Style-Type is no longer included in HTML5 http-equiv keywords. http://www.whatwg.org/specs/web-apps/current-work/#attr-meta-http-equiv
Comment 3•15 years ago
|
||
(In reply to comment #2) > BTW, HTML5 parser (setting html5.enable to true via about:config) will "fix" > the problem. And it is also a correct behavior. > HTML5 doesn't consider the non-CSS style attribute. > http://www.whatwg.org/specs/web-apps/current-work/#the-style-attribute > Moreover, Content-Style-Type is no longer included in HTML5 http-equiv > keywords. > http://www.whatwg.org/specs/web-apps/current-work/#attr-meta-http-equiv Um, it's strange spec. The style attribute cannot accept non-CSS style sheet languages, but the style elements and the external style sheets which are linked by link elements allow the non-CSS style sheets.
Henri, is this an intended change with the new HTML 5 parser?
Whiteboard: [html5]
(In reply to comment #4) > Henri, is this an intended change with the new HTML 5 parser? There is no difference between using the old and the new parser. (In reply to comment #3) > Um, it's strange spec. The style attribute cannot accept non-CSS style sheet > languages, but the style elements and the external style sheets which are > linked by link elements allow the non-CSS style sheets. There's only a style attribute spec for CSS but not for other style languages.
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: html5
Summary: Firefox doesn't process Content-Style-Type of "text/ccs" (sic) → inline styles ignored using Content-Style-Type of "text/ccs" (sic)
Version: unspecified → Trunk
Comment 6•6 years ago
|
||
We should really remove this feature.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•