-
Notifications
You must be signed in to change notification settings - Fork 274
normalized_encode incorrectly unencodes %26 to & #424
Copy link
Copy link
Open
Description
When a query parameter includes %26, normalized_encode replaces it with a literal &, which results in a different URI:
pry(main)> Addressable::URI.normalized_encode("https://example.com?foo=bar%26baz")
=> "https://example.com?foo=bar&baz"The more comprehensive URI#normalize method works correctly:
pry(main)> Addressable::URI.parse("https://example.com?foo=bar%26baz").normalize.to_s
=> "https://example.com/?foo=bar%26baz"This issue is possibly related to #366 and #386. However, both of those issues apply to URI#normalize, wheras this %26 issue only seems to apply to the normalized_encode method.
Reactions are currently unavailable