Skip to content

fix truncated query strings in ref URLs#14

Open
filip1 wants to merge 1 commit into
webvariants:masterfrom
filip1:patch-1
Open

fix truncated query strings in ref URLs#14
filip1 wants to merge 1 commit into
webvariants:masterfrom
filip1:patch-1

Conversation

@filip1
Copy link
Copy Markdown

@filip1 filip1 commented Mar 10, 2020

When the widget is embedded on a URL containing a query string such as https://example.com/path?foo=1&bar=2, the widget[ref] parameter that gets sent on form submission and saved as "ref" in the database is truncated before the first "=" character. That means it gets stored as https://example.com/path?foo

I think that wrapping the URL string in encodeURIComponent() before appending it to the serialized form should fix the issue.

When the widget is embedded on a URL containing a query string such as https://example.com/path?foo=1&bar=2, the widget[ref] parameter that gets sent on form submission and saved as "ref" in the database is truncated before the first "=" character. That means it gets stored as https://example.com/path?foo

I think that wrapping the URL string in encodeURIComponent() before appending it to the serialized form should fix the issue.
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