angular/angular.dart — pull request #1536 by chirayuk (2014-10-10 22:38:53+00:00)
Title: fix(resource_url_resolver): IE/Safari compatible HTML parsing

On Internet Explorer (e.g. IE10 on Win7), the following weird bug occurs
with template elements. FYI, IE does not support template element, but
this bug appears to only hit template elements and but not other unknown
elements.

var doc = new DOMParser().parseFromString("

", "text/html");

// Prints "" as expected.
console.log(doc.body.innerHTML);

// This should be a no-op.
doc.body.querySelectorAll("div");

// Prints "" - completely losing "CONTENTS".
console.log(doc.body.innerHTML);

This commit uses an alternate parsing method compatible with supported
browsers, and also fixes a RegExp for IE compatibility.