The code here does not return what one expects:
jQuery('<div>Look here: [ jQuery0="null" ]</div>').html()
Rather, you get:
Look here: [ ]
The jQuery source code in question:
html: function( value ) {
return value === undefined ?
(this[0] ?
this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
null) :
this.empty().append( value );
},
What would be the motivation behind the .replace
? I do not have time to go over the rest of jQuery, but code like this makes me wonder if I should use jQuery in production at all.