Jquery crash bug on IE8 using .attr() method

Jquery crash bug on IE8 using .attr() method

Jquery doesn't support namespaced attributes, which is fine, but it shouldn't crash when they are used.  The enclosed file demonstrates that querying for .attr('ex:role') inside a table causes jquery to crash (silently) and interrupt processing.  This forum claims it won't let me upload my sample html file, so I'm enclosing the source here.  Or, you can visit http://people.csail.mit.edu/karger/jquery-bug.html


<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js" type="text/javascript"></script>

<title>
Jquery crashes IE on namespaced attributes in a table
</title>
<script>
$(
function() {

alert('before the .attr() call');
alert($('table').attr('ex:role'));
alert('after the .attr() call');

}
);

</script>

</head>
<body>

This document demonstrates a jquery (v 1.4.1 and earlier) bug that shows up in IE8 (and I think was in IE7 last year).  In IE8, if a namespaced attribute is inside a table, then jquery crashes, suspending further execution, while trying to evaluate .attr().  It doesn't matter what tag the attribute is on; it can be a div etc, so long as it is inside the table tag. 
<p>
This file contains a script demonstrating the problem.  The alert statement before the .attr() call is invoked, but the statement immediately after never is. 
<p>
Jquery doesn't handle namespaced attributes very well.  This is a design decision that isn't fundamentally wrong.  But, it should still fail gently.  Here is one case where it doesn't. 

Here is a test table:
<table>
<tr  ex:role="viewPanel">
</tr>
</table>


</body>

</html>