Decode URL-encoded cashier form values#58
Merged
Conversation
The cashier controller rawurlencode()s all parameters, but the form hidden inputs were outputting the encoded values directly. When the browser submits the form, it encodes them again, causing %20 to become %2520. Now using urldecode() on the hidden input values and the editable detail field so the browser's own encoding produces correct single-encoded URLs. https://claude.ai/code/session_01Q8WZCKWbyEcCurQrT3odmq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds URL decoding to form field values in the cashier form component to properly display URL-encoded data.
Key Changes
urldecode()tocampaign_titlehidden input valueurldecode()topayeehidden input valueurldecode()todetailhidden input value (2 occurrences)urldecode()todetailtext input placeholderDetails
The changes ensure that URL-encoded parameters passed to the cashier form are properly decoded before being displayed in form fields and placeholders. This prevents users from seeing encoded characters (e.g.,
%20for spaces) in the form UI while maintaining the correct values for form submission.https://claude.ai/code/session_01Q8WZCKWbyEcCurQrT3odmq