Skip to main content

Bug Tracker

Side navigation

#7105 closed bug (worksforme)

Opened September 30, 2010 01:51PM UTC

Closed October 01, 2010 12:33AM UTC

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:
Description

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.

Attachments (0)
Change History (1)

Changed October 01, 2010 12:33AM UTC by snover comment:1

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