-
Notifications
You must be signed in to change notification settings - Fork 27.4k
encode uri: Matrix urls, semicolons fix 4065 #4067
Conversation
- added ; to the list of replacements - added a unit test
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
Can you translate the CLA to Dutch? |
Basically, what you are saying is that the path of a URI is made up of segments, which are defined as follows::
Currently, I agree with this but if you look at the code, it seems to me that we need to fix the |
@eonlepapillon - are you able to sign the CLA if it is not translated? |
Of course I can sign the CLA. The CLA would be more understandable if it was written in one's own language. |
(sorry I pressed the wrong button) |
Realname: Peter Ahlers (I see you are an alpinist and climbed the Liskamm. I tried the Dufourspitze but had to return because the strong wind) |
Changing the whole encoding system is a bridge to far for me. I'm just using Angular for a month now. I need to learn a lot about writing unittests. But I don't mind to discuss the new functions. |
@eonlepapillon - the CLA reads like Chinese to me too and I am a native English speaker! |
OK, so my only objection to this is that it appears that while semi-colons are valid characters to appear in a URI segment (and query) they should really only be used for specific application purposes and otherwise still escaped. In other words, if the semi colon appears in the content of the URI segment and is not being used as a delimiter then it should be escaped. The trouble right now is deciding at what point one should escape such things. |
Good thinking. A possible solution is to config these rules in the $resource configuration. I think there are two ways to configure.
uri partThe challenge here is that a $resource Object doesn't have a general configuration (only a configuration per method). $resource('http://www.domain.com/:path?query=true#hash',{path:'Hello;World$'}, {
get:{
method: 'GET',
ignoreEncode: {
hierarchicalpart: ':',
path: '$&:;' // string with characters to ignore during encoding
}
}
}); resource param$resource('http://www.domain.com/:path?query=true#hash',{
path: {
ignoreEncode: '$&:;',
value: 'Hello;World$'
}
}, {
get:{
method: 'GET'
}
}); Maybe there are more solutions, but both way means a lot of refactoring. |
I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let me know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
I'm sorry, It's not clear for me what you mean. I need to commit something and put my email in the commit? |
@eonlepapillon - your email is in the commits that you have provided in this PR. (See https://github.com/angular/angular.js/pull/4067.patch) We have used this to look for your signature of the CLA. Since we did not find it, @IgorMinar is suggesting that you have either not signed it or signed it with a different email address to the one in the commit. |
@petebacondarwin - Thanks, I didn't know my email is visible in the patch. @IgorMinar - I filled in a new CLA. |
@IgorMinar Did you get my CLA? |
Closing due to #8377 |
Solved issue 4065, Support for Matrix URIs
#4065