The URI::DEFAULT_PARSER.escape method escapes a string so that it is safe to use as a URL, but it doesn't handle URLs that are already percent-encoded or have special characters.
This PR makes it possible to unescape the URL and then use URI::DEFAULT_PARSER.escape. However, it's generally better to handle URLs using a library designed for such tasks, like Addressable::URI.
The URI::DEFAULT_PARSER.escape method escapes a string so that it is safe to use as a URL, but it doesn't handle URLs that are already percent-encoded or have special characters.
This PR makes it possible to unescape the URL and then use URI::DEFAULT_PARSER.escape. However, it's generally better to handle URLs using a library designed for such tasks, like Addressable::URI.