Bug Tracker

Modify

Ticket #5022 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 3 years ago

strings of markup and application/xml

Reported by: jablko Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Attachments

patch Download (552 bytes) - added by jablko 4 years ago.

Change History

Changed 4 years ago by jablko

comment:1 Changed 4 years ago by dmethvin

  • Component changed from unfilled to core

Perhaps you'd want to see if the context, rather than the div, is xml?

comment:2 Changed 3 years ago by jablko

comment:3 Changed 3 years ago by jablko

.innerHTML doesn't work in non-HTML documents, I think handling the exception with DOMParser() allows some current tests which fail with test/xhtml.php (Content-Type: application/xhtml+xml) to pass, e.g. test/unit/manipulation.js "html(String)"

Here's a new test,  http://www.sfu.ca/~jdbates/tmp/jquery/201004090/patch

Without this change it passes with test/index.html but fails with test/xhtml.php - with this change it passes with both

comment:4 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

This patch is too magical for my taste, it's very difficult to tell xml from html and wrapping a try/catch around it is going to cause trouble no doubt.

I'm closing this as a dup of #4617 which asks for xml support but takes a different approach.

comment:5 Changed 3 years ago by dmethvin

Duplicate of #4617.

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.