Comments (5)
Hey @ashutoshkrris, apologies for the confusion I'll try and make the task a little clearer.
If disablePathEncoding
is set to true
then the parts of the path that do not adhere to the URL spec should not be encoded.
For example:
When disablePathEncoding
is set to false
, IE the default behavior
- http://sdk-test.imgix.net/ <>[]{}|^%.jpg → http://sdk-test.imgix.net/%20%3C%3E[]%7B%7D%7C/%5E%.jpg
- http://www.example.com/products/123 → http://www.example.com/products/123
When disablePathEncoding
is set to true
- http://sdk-test.imgix.net/ <>[]{}|^%.jpg → http://sdk-test.imgix.net/ <>[]{}|^%.jpg
- http://www.example.com/products/123 → http://www.example.com/products/123
As a suggestion, you could do some test-driven development (TDD) here by creating a variant of these tests. They should test that settings disablePathEncoding
esnures the URL does not get encoded.
To run those tests, in the project root you'll need to run:
pip install ".[test]"
pip install tox
tox
from imgix-python.
Hi @luqven
I would like to work on this issue.
from imgix-python.
Hey @ashutoshkrris 👋 ,
Glad to hear it! I'll marked this issue as assigned to you.
In terms of next steps, please either comment here or open a RFC (request for comment) draft PR explaining the change you'd like to implement.
You can also take a look at our contributing guidelines to get you started.
If you have any trouble at all getting setup or have any questions, don't hesitate to comment here and tag a team member.
from imgix-python.
Thanks for assigning me the issue, @luqven.
Just to confirm, we have these conditions:
- If
disablePathEncoding
is set toTrue
, thenhttp://www.example.com/products/123
will have no change. - If
disablePathEncoding
is set toFalse
, thenhttp://www.example.com/products/123
will be converted tohttp://www.example.com/products%2F123
.
Is what I understand correct?
from imgix-python.
@luqven
In order to add the optional disable_path_encoding
functionality, I'd like to make the following changes:
- Add
_disable_path_encoding
in the constructor ofUrlBuilder
class with a default value ofFalse
. - Update the
_sanitize_path
method to use the_disable_path_encoding
variable. - Add more testcases in
test_url_builder
andtest_srcset
to cover the new scenarios.
Let me know if I am missing something.
from imgix-python.
Related Issues (14)
- Submit to PyPI HOT 1
- feat: customize variable qualities HOT 2
- feat: customize target Device Pixel Ratios HOT 4
- Add License
- Pull README into setup.py's long_description HOT 1
- Think through potential rename
- Needs tests w/ TravisCI integration HOT 1
- Trouble signing with `%20` character in url for HOT 11
- URI signature match failed when dl parameter has a space HOT 1
- Type Safety for URL options HOT 5
- Handle fully-qualified URLs in paths better
- Py2 and 3 compatibility HOT 10
- Consider storing a float percentage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgix-python.