Bug Tracker

Modify

Ticket #9230 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

Error with .html()

Reported by: MrMamen Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6
Keywords: Cc:
Blocking: Blocked by:

Description

I get an error on line 600 only in IE, when trying to set html on a object.

The code which works in earlier versions of jQuery (and other browsers) is like this: $dialogContent.html(ajaxFetchedContent);

ajaxFetchedContent contains <script>-tags, and seem to be the reason for failing. the script are valid javascript (as they work on pages where they are not included dynamically, and in other browsers), but when commenting htem away I get no such error.

Change History

comment:1 Changed 2 years ago by MrMamen

After further investigation, this only failes if html-comments are present inside script block. Like this:

<script type="text/javascript">
<!--
function foo() {
  //bar
}
// -->
</script>

comment:2 Changed 2 years ago by jaubourg

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

comment:3 Changed 2 years ago by jaubourg

Duplicate of #9221.

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.