Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7105 closed bug (worksforme)

jQuery error at line 4448 in Safari (Mac, iPad, iPhone)

Reported by: v_ignatyev Owned by:
Priority: high Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: append dom inserting innerHTML Safari Cc:
Blocked by: Blocking:


It seems, that the problem is specific for all webkit browsers, but I've caught them on Safari only. It raises the next error:

NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed.

It appears after call $(selector).append(content), when content contains symbol "&", for example: $(document.body).append('Go next →');

The problem can be solved, replacing '&' with '\&' and replacing all another symbols with UTF-8 equivalents.

As I see, it can be a problem of webkit XML parser.

Change History (1)

comment:1 Changed 12 years ago by snover

Priority: blockerhigh
Resolution: worksforme
Status: newclosed

Thanks for the report, but I am unable to reproduce this issue. If you are attempting to serve pages as application/xhtml+xml, please be aware that jQuery will break whenever you try to use a method that interacts with innerHTML, as this property does not exist in XML mode. This is not a jQuery bug. It is your responsibility as an author to avoid using these methods if you choose to serve application/xhtml+xml. Test case

Note: See TracTickets for help on using tickets.