#16 closed bug (invalid)
Returning script tag in IE fails
Reported by: | DaveG | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ajax | Version: | |
Keywords: | script, ajax | Cc: | |
Blocked by: | Blocking: |
Description
IE will not execute javascript with surrounding script tags unless the tags are preceded by a character. Thus returning the following in response to a .load fails to execute in IE: <script type="text/javascript"> /* <![CDATA[ */
alert("here");
/* ]]> */ </script>
Preceding with some character works: - <script type="text/javascript"> /* <![CDATA[ */
alert("here");
/* ]]> */ </script>
Change History (4)
comment:1 Changed 17 years ago by
Milestone: | → 1.0 |
---|---|
Version: | → 1.0b1 |
comment:2 Changed 17 years ago by
Version: | 1.0b1 → 1.0 |
---|
comment:3 Changed 17 years ago by
Milestone: | 1.0 |
---|---|
Version: | 1.0 |
comment:4 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Can be easily worked around by ommiting the script tags in the response (and using $.getScript() to eval on the fly).
Note: See
TracTickets for help on using
tickets.
I don't plan on getting to this for 1.0. The obvious workaround, however, is to simply return just the Javascript, then eval that on the fly - as opposed to injecting it into the DOM (which I assume that you're doing).