Ticket #6095 (closed bug: duplicate)
jQuery strips </embed> from plugin output
| Reported by: | Jason | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | 1.4.2 | |
| Component: | manipulation | Version: | 1.4.1 |
| Keywords: | strip,tag,embed | Cc: | |
| Blocking: | Blocked by: |
Description
For some reason, jQuery strips the closing embed tag from HTML which is output from a plugin.
For example, the following -
$(this).html('<object id="jasonlau_dot_biz" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase=" http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading ..." type="application/x-ms-wmp" width="300" height="40"><param name="fileName" value=" http://jasonlau.biz/public/mixdown.mp3" /><param name="autostart" value="false" /><param name="loop" value="true" /><embed id="jasonlau_dot_biz" type="application/x-ms-wmp" pluginspage=" http://microsoft.com/windows/mediaplayer/en/download/" src=" http://jasonlau.biz/public/mixdown.mp3" autostart="false" loop="true" width="300" height="40"></embed></object>');
outputs this -
<object id="jasonlau_dot_biz" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase=" http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading ..." type="application/x-ms-wmp" width="300" height="40"><param name="fileName" value=" http://jasonlau.biz/public/mixdown.mp3"><param name="autostart" value="false"><param name="loop" value="true"><embed id="jasonlau_dot_biz" type="application/x-ms-wmp" pluginspage=" http://microsoft.com/windows/mediaplayer/en/download/" src=" http://jasonlau.biz/public/mixdown.mp3" autostart="false" loop="true" width="300" height="40"></object>
Also, the /forward-slash is being stripped from the end of the param tag.
This seems to only happen with output from a plugin.
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.

This has been fixed and will be in jQuery 1.4.2.