Skip to content

Decode URL encoded form data. - #1

Merged
samuel-williams-shopify merged 3 commits into
mainfrom
decode-www-form
Aug 2, 2026
Merged

Decode URL encoded form data.#1
samuel-williams-shopify merged 3 commits into
mainfrom
decode-www-form

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Add Protocol::URL::Encoding.decode_www_form for decoding application/x-www-form-urlencoded data while preserving the existing nested argument and depth-limit behavior.

Unlike generic URL decoding, HTML form decoding treats + as a space. Percent-encoded plus signs remain literal plus signs. The existing generic encoder already emits %20, which form decoders accept as a space, so no separate form encoder is needed.

Testing

  • bundle exec bake test
  • bundle exec rubocop lib/protocol/url/encoding.rb test/protocol/url/encoding.rb
  • bundle exec bake decode:index:coverage lib

@samuel-williams-shopify samuel-williams-shopify changed the title Decode URL encoded form data. Encode and decode URL encoded form data. Aug 2, 2026
@samuel-williams-shopify samuel-williams-shopify changed the title Encode and decode URL encoded form data. Decode URL encoded form data. Aug 2, 2026
@samuel-williams-shopify
samuel-williams-shopify merged commit c66809e into main Aug 2, 2026
40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the decode-www-form branch August 2, 2026 22:29
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.

1 participant