caridy / yui3-gallery

YUI3 Gallery Modules
http://yuilibrary.com/gallery
17 stars 3 forks source link

_parseContent doesn't work in IE if empty elements exist #4

Open blt04 opened 13 years ago

blt04 commented 13 years ago

Dispatcher fails in IE8 if trying to parse content with an empty node before a script tag. For example, if you dispatch the following string:

<div></div><script type="text/javascript" src="myscript.js"></script>

myscript.js will not be loaded, whereas if you dispatch the following string:

<div>&nbsp;</div><script type="text/javascript" src="myscript.js"></script>

myscript.js will be loaded.

Something in the _parseContent method doesn't recognize the script tag when the first node is empty.