mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Improve canonicalizeHTML to support empty attribute on IE8
This commit is contained in:
@@ -39,8 +39,12 @@ canonicalizeHtml = function(html) {
|
||||
if (! attrList[i])
|
||||
continue;
|
||||
var a = attrList[i].split('=');
|
||||
if (a.length < 2)
|
||||
a.push(a[0]); // things like checked=checked, in theory
|
||||
|
||||
// In IE8, attributes whose value is "" appear
|
||||
// without the '=' sign altogether.
|
||||
if (a.length < 2)
|
||||
a.push("");
|
||||
|
||||
var key = a[0];
|
||||
// Drop another expando property used by Sizzle.
|
||||
if (key === 'sizset')
|
||||
|
||||
@@ -83,11 +83,11 @@ Tinytest.add("ui - render - basic", function (test) {
|
||||
'<br a="">',
|
||||
'HTML.BR({a: [[""]]})');
|
||||
|
||||
run(BR({
|
||||
x: function () { return function () { return []; }; },
|
||||
a: function () { return function () { return ''; }; }}),
|
||||
'<br a="">',
|
||||
'<br a="">');
|
||||
run(BR({
|
||||
x: function () { return function () { return []; }; },
|
||||
a: function () { return function () { return ''; }; }}),
|
||||
'<br a="">',
|
||||
'<br a="">');
|
||||
});
|
||||
|
||||
// test that we correctly update the 'value' property on input fields
|
||||
|
||||
Reference in New Issue
Block a user