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

use URI::DEFAULT_PARSER to get rid of deprecation warning #73

Conversation

sterlzbd
Copy link

@sterlzbd sterlzbd commented Dec 27, 2020

This feels like a bit of a hack to get rid of the deprecation warning but seemed to be the simplest way. From what I can tell, URI.escape and URI.unescape have been deprecated because they shouldn't be used to escape actual URIs. In this case though we aren't using them to escape URIs and none of the recommended replacements (CGI.escape, URI.encode_www_form or URI.encode_www_form_component) allow only escaping specific characters which is the behavior we want.

I didn't add a spec because this is doesn't meaningfully change the code (URI.escape/URI.unescape already delegate to URI::DEFAULT_PARSER) and test_xml_name_not_screwed_up_by_xml_convention already tests this behavior.

Fixes #71

@sterlzbd sterlzbd closed this Aug 19, 2021
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.

Obsolete references to URI.escape and URI.unescape
1 participant