mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-22 10:49:24 +08:00
fix(startingTag): make tag name always lowercase
some browsers (IE) always provide the nodeName as upper-case
This commit is contained in:
@@ -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); });
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user