fix(startingTag): make tag name always lowercase

some browsers (IE) always provide the nodeName as upper-case
This commit is contained in:
Igor Minar
2012-06-08 11:53:17 -07:00
parent 9be82d942f
commit 5c95b8cccc
3 changed files with 11 additions and 11 deletions

View File

@@ -755,7 +755,9 @@ function startingTag(element) {
// are not allowed to have children. So we just ignore it.
element.html('');
} catch(e) {}
return jqLite('<div>').append(element).html().match(/^(<[^>]+>)/)[1];
return jqLite('<div>').append(element).html().
match(/^(<[^>]+>)/)[1].
replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
}