Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape # in filename url #721

Merged
merged 2 commits into from
Aug 29, 2018
Merged

Escape # in filename url #721

merged 2 commits into from
Aug 29, 2018

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Aug 29, 2018

git+https://github.com/org/project#egg=project can have # in the name and it should be escaped when used in a URL

git+https://github.com/org/project#egg=project can have # in the name and it should be escaped when used in a URL
asv/www/asv.js Outdated
@@ -239,6 +239,7 @@ $(document).ready(function() {
"LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8",
"LPT9"];
name = name.replace(bad_re, "_");
name = name.replace("#", "%23");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also take the comment above "The implementation must match asv.util.sanitize_filename" into account.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just escaping the # character. Filename is the same.

Copy link
Collaborator

@pv pv Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, possibly, this is not the right place to do the url quoting, but it should be done at the point where the json request is made.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement should be done in graph_to_path, so that the comment does not become false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7ba45ca

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, lgtm

@pv pv merged commit 2bb13c0 into airspeed-velocity:master Aug 29, 2018
@isuruf
Copy link
Contributor Author

isuruf commented Aug 29, 2018

Thanks

@isuruf isuruf deleted the patch-1 branch August 29, 2018 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants