Bug Tracker

Modify

Ticket #3598 (closed bug: duplicate)

Opened 5 years ago

Last modified 15 months ago

Internet Explorer doesn't parse XML from file:/

Reported by: sbryant Owned by: flesler
Priority: low Milestone: 1.5
Component: ajax Version: 1.4.4
Keywords: explorer,xml Cc:
Blocking: Blocked by:

Description

This ticket provides a fix for an IE bug: it won't parse an XML file without knowing that the file is XML. HTTP provides the Content-type header, but file:/ doesn't, and IE won't even fall back to the Windows file type settings (which would at least let it parse *.xml). Other browsers will attempt to parse XML from file:/ and don't have this problem.

This bug will affect anyone dry testing on the local file system with the Internet Explorer.

The fix checks whether the expected DOM tree is missing, and attempts to create it. A parse failure here leaves the HTTP request effectively in the same state as before.

The fix is 2 new lines of code in httpData(), directly before the "parsererror" test.

if ( xml && !data.documentElement && xhr.responseStream )

try { data.load( xhr.responseStream ); } catch(e){}

This patch is against jquery 1.2.6.

Steve

Attachments

jquery.diff Download (567 bytes) - added by sbryant 5 years ago.

Change History

Changed 5 years ago by sbryant

comment:1 Changed 5 years ago by flesler

  • Cc sbryant, flesler added
  • need changed from Test Case to Review
  • Status changed from new to assigned
  • Owner set to flesler

Ok, seems good. I'll assign this to me so I have it at hand once I get to check this closer.

comment:2 Changed 2 years ago by rwaldron

  • Keywords explorer,xml,ajaxrewrite added; explorer xml removed

comment:3 Changed 2 years ago by jitter

  • Status changed from assigned to closed
  • Cc sbryant, flesler removed
  • Priority changed from minor to low
  • Version changed from 1.2.6 to 1.4.4
  • Milestone changed from 1.3 to 1.5
  • Keywords explorer,xml added; explorer,xml,ajaxrewrite removed
  • Resolution set to duplicate

This is fixed with jQuery 1.5. Ypu just need to set dataType: "xml"

comment:4 Changed 2 years ago by jitter

Duplicate of #4807.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.