rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
- rnocache = /<script|<object|<embed|<option/i,
+ rnocache = /<script|<object|<embed|<option|<style/i,
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
fcloseTag = function( all, front, tag ) {
return rselfClosing.test( tag ) ?
}
var testHtml = function(valueObj) {
- expect(29);
+ expect(31);
jQuery.scriptorder = 0;
equals( jQuery("<div/>").html(valueObj(" "))[0].innerHTML, " ", "Make sure entities are passed through correctly." );
equals( jQuery("<div/>").html(valueObj("&"))[0].innerHTML, "&", "Make sure entities are passed through correctly." );
+ jQuery("#main").html(valueObj("<style>.foobar{color:green;}</style>"));
+
+ equals( jQuery("#main").children().length, 1, "Make sure there is a child element." );
+ equals( jQuery("#main").children()[0].nodeName.toUpperCase(), "STYLE", "And that a style element was inserted." );
+
reset();
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();