Extra space in the meta tag prevents Japanese page loading correctly.

VERIFIED FIXED in M13

Status

()

P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: tao, Assigned: ftang)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: 1 line (character) fix, URL)

(Reporter)

Description

19 years ago
Please load the page in the URL field to see that a Shift_JIS encoded
page is not rendered correctly. Changing the charset from the "View"
menu to "Shift_JIS" will redisplay it right.


If you view its page source, you'll find that the meta tag looks like
this:

 <META HTTP-EQUIV="Content-Type" CONTENT="text/html ; charset=Shift_JIS">
                                                   ^
Note that there is an extra space marked at "^".
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → INVALID
(Assignee)

Comment 1

19 years ago
The page itself is invalid. There should not have a space between text/html and
';'  accoruding to RFC 2045:
http://www.cis.ohio-state.edu/htbin/rfc/rfc2045.html
Won't fix it. Ask the webmaster to fix his/her page...

5.1.  Syntax of the Content-Type Header Field

   In the Augmented BNF notation of RFC 822, a Content-Type header field
   value is defined as follows:

     content := "Content-Type" ":" type "/" subtype
                *(";" parameter)
                ; Matching of media type and subtype
                ; is ALWAYS case-insensitive.

     type := discrete-type / composite-type

     discrete-type := "text" / "image" / "audio" / "video" /
                      "application" / extension-token

     composite-type := "message" / "multipart" / extension-token

     extension-token := ietf-token / x-token

     ietf-token := <An extension token defined by a
                    standards-track RFC and registered
                    with IANA.>

     x-token := <The two characters "X-" or "x-" followed, with
                 no intervening white space, by any token>

     subtype := extension-token / iana-token

     iana-token := <A publicly-defined extension token. Tokens
                    of this form must be registered with IANA
                    as specified in RFC 2048.>

     parameter := attribute "=" value

     attribute := token
                  ; Matching of attributes
                  ; is ALWAYS case-insensitive.

     value := token / quoted-string

     token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
                 or tspecials>

     tspecials :=  "(" / ")" / "<" / ">" / "@" /
                   "," / ";" / ":" / "\" / <">
                   "/" / "[" / "]" / "?" / "="
                   ; Must be in quoted-string,
                   ; to use within parameter values
(Reporter)

Comment 2

19 years ago
But, weren't we more tolerant to errors in HTML page as opposed to XMLs? Seems
to me, 4.x renders the page properly. If we tighten the rule, won't there
international HTML pages stop rendering "properly" in 5.0 client.

Comment 3

19 years ago
I agree with Tao. 4.X allows a space between text/html and ; so 5.0 should allow
a space there too.

Updated

19 years ago
Status: RESOLVED → REOPENED

Updated

19 years ago
Resolution: INVALID → ---

Comment 4

19 years ago
Reopen this to consider again.
(Assignee)

Updated

19 years ago
Status: REOPENED → ASSIGNED
Target Milestone: M13
(Assignee)

Comment 5

19 years ago
Fix it is easy.
cvs server: Diffing src
Index: src/nsMetaCharsetObserver.cpp
===================================================================
RCS file: /m/pub/mozilla/intl/chardet/src/nsMetaCharsetObserver.cpp,v
retrieving revision 1.20
diff -c -r1.20 nsMetaCharsetObserver.cpp
*** nsMetaCharsetObserver.cpp   1999/12/07 14:05:25     1.20
--- nsMetaCharsetObserver.cpp   1999/12/17 23:01:13
***************
*** 211,217 ****
                contentValue=valueArray[i];
        }
        static nsAutoString contenttype("Content-Type");
!       static nsAutoString texthtml("text/html;");
        if((nsnull != httpEquivValue) &&
           (nsnull != contentValue) &&
           ((0==nsCRT::strcasecmp(httpEquivValue,contenttype.GetUnicode())) ||
--- 211,217 ----
                contentValue=valueArray[i];
        }
        static nsAutoString contenttype("Content-Type");
!       static nsAutoString texthtml("text/html");
        if((nsnull != httpEquivValue) &&
           (nsnull != contentValue) &&
           ((0==nsCRT::strcasecmp(httpEquivValue,contenttype.GetUnicode())) ||
cvs server: Diffing src/classic
This is a one character change.
Mark it for M13

Updated

19 years ago
Whiteboard: 1 line (character) fix
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

19 years ago
remove one ";" after "text/html" when we do attribute comparsion

Comment 7

19 years ago
I verified this in 2000020110 Win32 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.