angular/angular.js — pull request #1982 by gonzaloruizdevilla (2013-02-10 12:58:08+00:00)
Title: fix(jqLite): IE8 no longer replaces link text content with mailto value

fixes #1949

IE bug: http://webbugtrack.blogspot.com.es/2008/07/bug-140-changing-mailto-links-error-in.html

Only happens when the link has only text nodes. To prevent IE from replacing the text content, the text nodes must be detached before setting the href value and reattached afterwards.

I tried to make a unit test, but I'm not able to reproduce the bug inside the test. I tried something like:

```javascript
var link = angular.element('text');
link.attr("href", "mailto:name@domain.com");
expect(link.text()).toBe("text");
```
but with this the test doesn't fail before applying the change.