This repository was archived by the owner on Apr 12, 2024. It is now read-only.
feat($resource): support an unescaped url#2778
Closed
Conversation
Added new regex to test the url parameters with: - if the parameter consists only of numbers, then it's a port
Contributor
Author
|
Any news? |
This was referenced Jul 7, 2013
Contributor
PR Checklist (Minor Feature)
|
Contributor
|
@IgorMinar / @mhevery / @vojtajina - is this a breaking change? |
|
👍 I'd say this is fixing something that is broken ;-). |
|
I do agree with @kdekooter... But the only way this isn't a breaking change is if we make the assumption that nobody is using numeric URL params. I'd like to think that nobody is doing that, but we just don't know. |
Contributor
|
lgtm |
Contributor
|
Merged. Thanks @leostera and others for your input. |
ctrahey
pushed a commit
to ctrahey/angular.js
that referenced
this pull request
Jul 22, 2013
The colon character is used to identify parameters in $resource. This meant that we had to escape the colon used in a port. It turns out that this is not necessary if we assume that parameter names cannot consist of only digits. If the parameter consists only of numbers, then it's a port. Closes angular#2778
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added new regex to test the url parameters with:
Allows to write a URL normally.
Escaping the port does not comply with the URL syntax
Regular Expression and it's position in the if clause are meant to short-circuit ASAP.
Refer to #2652