angular/angular.js — pull request #8734 by mackenco (2014-08-22 20:04:37+00:00)
Title: fix($browser): colon in url causes infinite digest in FF

Bug found when an angular app is running in an iframe + has a colon in the query string in Firefox. This stops angular from working until the page is refreshed, errors are:

```
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 7; oldVal: 6"],["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch; newVal: 10; oldVal: 9"],["fn: $locationWatch; newVal: 11; oldVal: 10"]]
```
(fixed with the addition to line 178)
and

```
Exception { message: "", result: 2147500037, name: "NS_ERROR_FAILURE"}
```
(fixed with the addition to line 125).

What is happening is that Firefox's location.href encodes colons (after string position seven) to %3A. This doesn't match with other encoding and the app gets stuck. For example, we were passing in an absolute url through the query and getting issues; it also happened with the port on localhost. Very similar to: [#920](https://github.com/angular/angular.js/issues/920).
To reproduce, just run a small app locally in Firefox (I was able to recreate with angular phonecat) in an iframe.

```