Last Comment Bug 295652 - [FIXr]document.open("text/html; charset=..") opens as text/plain
: [FIXr]document.open("text/html; charset=..") opens as text/plain
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: P1 normal (vote)
: mozilla1.8beta3
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
: Hixie (not reading bugmail)
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-26 18:44 PDT by Udo Richter
Modified: 2005-06-01 10:37 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (1.20 KB, text/html)
2005-05-26 18:48 PDT, Udo Richter
no flags Details
Fix (1.08 KB, patch)
2005-05-26 23:32 PDT, Boris Zbarsky [:bz] (still a bit busy)
jst: review+
jst: superreview+
shaver: approval1.8b3+
Details | Diff | Splinter Review

Description Udo Richter 2005-05-26 18:44:45 PDT
Documents opened with document.open("text/html; charset=iso-8859-1") display its
content as text/plain with visible html tags. Although this is not a valid mime
type, displaying it as text/plain is a bad idea, because this is a common
mistake, and IE displays it as text/html.

On a side note: Clicking reload on a generated page turns the page into
text/html, and tags disappear.

This was introduced by the checkin of bug 73409

The current behaviour is to treat everything but text/html as text/plain. I'd
suggest accepting at least everything that begins with text/html.
Comment 1 Udo Richter 2005-05-26 18:48:36 PDT
Created attachment 184646 [details]
testcase

testcase, opens iframe and/or window with several mime types
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2005-05-26 23:32:11 PDT
Created attachment 184658 [details] [diff] [review]
Fix
Comment 3 Johnny Stenback (:jst, jst@mozilla.com) 2005-05-27 19:02:54 PDT
Comment on attachment 184658 [details] [diff] [review]
Fix

r+sr=jst
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2005-05-27 21:02:46 PDT
Comment on attachment 184658 [details] [diff] [review]
Fix

Requesting approval for 1.8b3.	This is quite safe, and gives us better compat
with IE and NS4.
Comment 5 Mike Shaver (:shaver -- probably not reading bugmail closely) 2005-06-01 07:29:10 PDT
Comment on attachment 184658 [details] [diff] [review]
Fix

a=shaver
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2005-06-01 10:37:31 PDT
Fixed for 1.8b3.

Note You need to log in before you can comment on or make changes to this bug.