diff options
| author | Igor Minar | 2012-05-11 23:56:37 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-05-14 14:45:56 -0700 | 
| commit | c1533ef5762199bea18d3bf3bcba7fcf89272931 (patch) | |
| tree | 18388c49ce698e26501c156b619142c0ba51d9a1 /src | |
| parent | 679cb8a74a684454fe38fa9e1ddad396bb598c52 (diff) | |
| download | angular.js-c1533ef5762199bea18d3bf3bcba7fcf89272931.tar.bz2 | |
fix($location): support urls with any protocol
The url used for location parsing was quite strict and did not support
custom url schemes like "chrome-extension://". With this change the only
requirement for scheme is that it doesn't contain ":" character.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/location.js | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/ng/location.js b/src/ng/location.js index 575feb7e..6d38d1ac 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -1,6 +1,6 @@  'use strict'; -var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/, +var URL_MATCH = /^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,      PATH_MATCH = /^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,      HASH_MATCH = PATH_MATCH,      DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21}; | 
