Elements.from=function(text,excludeScripts){if(excludeScripts||excludeScripts==null){text=text.stripScripts()}var container,match=text.match(/^\s*<(t[dhr]|tbody|tfoot|thead)/i);if(match){container=new Element("table");var tag=match[1].toLowerCase();if(["td","th","tr"].contains(tag)){container=new Element("tbody").inject(container);if(tag!="tr"){container=new Element("tr").inject(container)}}}return(container||new Element("div")).set("html",text).getChildren()};