Giter VIP home page Giter VIP logo

Comments (5)

luqven avatar luqven commented on June 13, 2024 1

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

When disablePathEncoding is set to true

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.

ashutoshkrris avatar ashutoshkrris commented on June 13, 2024

Hi @luqven
I would like to work on this issue.

from imgix-python.

luqven avatar luqven commented on June 13, 2024

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.

ashutoshkrris avatar ashutoshkrris commented on June 13, 2024

Thanks for assigning me the issue, @luqven.
Just to confirm, we have these conditions:

  • If disablePathEncoding is set to True, then http://www.example.com/products/123 will have no change.
  • If disablePathEncoding is set to False, then http://www.example.com/products/123 will be converted to http://www.example.com/products%2F123.

Is what I understand correct?

from imgix-python.

ashutoshkrris avatar ashutoshkrris commented on June 13, 2024

@luqven
In order to add the optional disable_path_encoding functionality, I'd like to make the following changes:

  1. Add _disable_path_encoding in the constructor of UrlBuilder class with a default value of False.
  2. Update the _sanitize_path method to use the _disable_path_encoding variable.
  3. Add more testcases in test_url_builder and test_srcset to cover the new scenarios.

Let me know if I am missing something.

from imgix-python.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.