Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Conversation

makasim
Copy link
Contributor

@makasim makasim commented Nov 7, 2014

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

I'll add tests once we agreed on the fix

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

I dont know I am not a pro in this area, I'll do what you suggest

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

Hm I read a doc of rawurlencode and it states:

Returns a string in which all non-alphanumeric characters except -_.~ have been replaced with a percent (%) sign followed by two hex digits. This is the encoding described in » RFC 3986 for protecting literal characters from being interpreted as special URL delimiters, and for protecting URLs from being mangled by transmission media with character conversions (like some email systems).

and I think we have to keep it this way and make an exception for / and ? since they are allowed in fragment. other chars is not allowed so they have to be encoded.

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

Hm we can use whatever we want there: http://stackoverflow.com/a/2849800/579025

@nyamsprod
Copy link
Member

Good remarks, then this mean you pull request is good then ... if you add the tests to validate the changes I'll accept it

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

I want to extend it so other allowed symbols are not encoded, dont you mind? Cuz these still have to be encoded So, combined, the fragment cannot contain #, a raw %, ^, [, ], {, }, \, ", < and > according to the RFC..

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

and of course tests

@nyamsprod
Copy link
Member

Yes please do so If we are doing this let's do it properly 👍

@makasim
Copy link
Contributor Author

makasim commented Nov 7, 2014

@nyamsprod updated

nyamsprod added a commit that referenced this pull request Nov 7, 2014
…sh-and-question-symbols

[fragment] do not encode / and ?
@nyamsprod nyamsprod merged commit 8b37565 into thephpleague:master Nov 7, 2014
@nyamsprod
Copy link
Member

the master is up to date ... I'll prepare and release a bug fix version next week with the updated code. thanks for your contribution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants