0.7 escapes safe characters (change in behavior from 0.6)
0.6 used URI.escape, which uses URI::DEFAULT_PARSER.regexp[:UNSAFE] (/[^\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]/) under the hood to determine which characters to escape. This did not escape characters like forward slashes.
The change in 0.7 uses a much simpler regex that will result in URIs like this:
%2Fmy%2Furi
When they used to be result like this:
/my/uri
Is there a reason to escape more characters? We would prefer a non-breaking change that escaped the same characters as 0.6.
@geemus would you consider a PR that fixes this regression? This is blocking us from upgrading to Ruby 3, so we would be happy to contribute
Made a PR anyway: https://github.com/fog/fog-local/pull/25
I also added a test that shows the regression.
Hey, thanks. Sorry I think I missed the initial issue as I wasn't actively watching the repo any more.
I believe we made those changes in response to the URI method deprecation and didn't intend for it to change behavior, so a more effective fix (and one that doesn't rely on our own regex) sounds great.
This issue has been marked inactive and will be closed if no further activity occurs.
Looks like this was closed some time ago by #25 and we must have forgotten to close this issue at the time.