Opened 13 years ago

Closed 13 years ago

#872 closed defect (invalid)

XMLHTTPRequest & windows-1252 & setHTML charset can cause IE to generate junk at end of page and sometime hang or crash IE with certain characters

Reported by: smark@… Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: major Keywords: ie XMLHTTPRequest junk
Cc:

Description

We are using your editor, and we allow people to load in a template of text into the editor. We have a sample bit of data that when we load in causes ie6 (firefox is okay) to put garbage characters on the end of the html page (outside the boundaries of the textarea editor) and the page renders badly after that and sometimes it hangs the browser, and sometimes even crashes it.
I have a fairly simple html page that loads xinha as per your newbie page, does a xmlhttprequest to get the page and calls setHTML().
I tried the nightly build and it still does it.

Attachments (1)

xinha_ie6_problem.tar.gz (3.0 KB) - added by smark@… 13 years ago.
sample index.html that loads editor and data to load in editor that causes ie6 to crash

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by smark@…

sample index.html that loads editor and data to load in editor that causes ie6 to crash

comment:1 Changed 13 years ago by smark@…

Okay, I narrowed it down to a simple line of html:

<span style="font-size: 10pt; font-family: Arial;">Natasha Spivey ‘94<br /></span>

Note the backtick before the 94. If you take that out, or the style= or the span it will work, but this combination is the smallest bit I found that causes the problem.

comment:2 Changed 13 years ago by ray

  • Keywords ie XMLHTTPRequest added; ie6 html removed
  • Resolution set to invalid
  • Status changed from new to closed
  • Summary changed from setHTML causes ie6 to generate junk at end of page and sometime hang or crash ie to XMLHTTPRequest & windows-1252 & setHTML charset can cause IE to generate junk at end of page and sometime hang or crash IE with certain characters

no (Xinha) bug

Your document is encoded using the proprietary windows-1252 codepage. The ‘-character that caused your problem corresponds to a reserved control character in the UNICODE/ISO codepage, I think that is what got IE stumbling.

Solution:

  1. make sure that your server delivers the correct Content-Type header (Content-Type: text/html; charset=windows-1252) by
    1. configuring the server properly or
    2. use e.g. <?php header("Content-Type:text/html; charset=windows-1252"); ?>
  2. and/or consider employing an internationally standardized codepage like UTF-8 (UNICODE) or ISO-8895-x
Note: See TracTickets for help on using tickets.