Ticket #456 (closed bug: wontfix)
Script tags stripped from innerHTML on .load() (IE5.5)
| Reported by: | sidebog7 | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | ajax | Version: | |
| Keywords: | script ajax | Cc: | |
| Blocking: | Blocked by: |
Description
When returning a block of html such as the following the Script tag and anything within is removed. This means that contained script is not executed.
<div>Text</div><script type="text/javascript">alert('Working');</script><div>More Text</div>
On investigating the responseText contains the script, a callback such as function(html){alert(html);} displays the script, whereas if you perform an ALERT($('element').html()); the script is absent.
From further checks setting the innerHTML of an element to a piece of HTML doesn't seem to strip out the script so I am unsure what is causing this.
A fix to this is as reported in bug #16 to add a character (or as I have found to add <table style="display:none"></table> in front of the script)
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.
