Closed dokai closed 6 years ago
I didn't realize that shlex.quote
is not available in Python 2.x. I'll rework the PR if there is interest in merging the feature.
@dokai Yes there is :) Please, do.
Sure, will do. It seems that there is an existing backport of shlex.quote
available in https://github.com/chrissimpkins/shellescape. Would you be open to adding that as a dependency or rather have the implementation in this repo?
The amount of code is rather small so re-implementing/copying with attribution would not be an issue either.
Added the Python 2.x fix from @datakurre and rebased against current master.
Thanks. I’ll make a release only tomorrow due to PloneConf party tonight ;)
Currently, if the URL contains any query parameters (or anything else that is a special shell character) the example command won't be copy-pasteable as-is into a shell and the user must manually quote the URL to make the command runnable.
This PR adds shell quoting for the URL to accommodate the common use of of having multiple
&
separated query parameters in the URL. The URL will be quoted only when necessary.