Skip to main content

Bug Tracker

Side navigation

#9230 closed bug (duplicate)

Opened May 11, 2011 08:49AM UTC

Closed May 11, 2011 10:28AM UTC

Last modified May 11, 2011 10:28AM UTC

Error with .html()

Reported by: MrMamen Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6
Keywords: Cc:
Blocked by: Blocking:
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.

Attachments (0)
Change History (3)

Changed May 11, 2011 09:32AM UTC by MrMamen comment:1

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

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

Changed May 11, 2011 10:28AM UTC by jaubourg comment:2

resolution: → duplicate
status: newclosed

Changed May 11, 2011 10:28AM UTC by jaubourg comment:3

Duplicate of #9221.