Ticket #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: | |
| Blocking: | Blocked by: |
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.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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