File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ angular.module('ngResource', ['ng']).
290
290
this . defaults = defaults || { } ;
291
291
var urlParams = this . urlParams = { } ;
292
292
forEach ( template . split ( / \W / ) , function ( param ) {
293
- if ( param && ( new RegExp ( "((\\w|\\/|^)(?! \\\\:" + param + ")):" + param + " \\W") ) . test ( template ) ) {
293
+ if ( param && template . match ( new RegExp ( "[^ \\\\] :" + param + "\\W" ) ) ) {
294
294
urlParams [ param ] = true ;
295
295
}
296
296
} ) ;
Original file line number Diff line number Diff line change @@ -129,12 +129,6 @@ describe("resource", function() {
129
129
R . get ( { a : 'doh@fo o' , ':bar' : '$baz@1' , '!do&h' : 'g=a h' } ) ;
130
130
} ) ;
131
131
132
- it ( 'should allow relative paths in resource url' , function ( ) {
133
- var R = $resource ( ':a' ) ;
134
- $httpBackend . expect ( 'GET' , 'data.json' ) . respond ( '{}' ) ;
135
- R . get ( { a : 'data.json' } ) ;
136
- } ) ;
137
-
138
132
139
133
it ( 'should encode & in url params' , function ( ) {
140
134
var R = $resource ( '/Path/:a' ) ;
You can’t perform that action at this time.
0 commit comments