I have a (existing before I installed YUI) block which contains javascript code (generated twitter.com badge). When I edit this block with YUI the javascript vanishes, and when I switch to text only mode it is gone.
Below is the code that causes the problem in the editor.
<div class="mytweets" style="margin: -10px;">
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 5,
interval: 6000,
width: 250,
height: 300,
theme: {
shell: {
background: '#7a2c2f',
color: '#ffffff'
},
tweets: {
background: '#9c3b3b',
color: '#ffffff',
links: '#4aed05'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('anonymous').start();
</script>
</div>
Comments
Comment #1
dman commentedDoes it still happen if you use XHTML-valid javascript embed code instead? Most editors have to use the browser DOM, and most browsers DOM now uses XHTML under the hood.