Skip to content

Conversation

@scottjehl
Copy link
Contributor

Additionally, fixes #1939:

  • currently, when text fields repopulate from localstorage on refresh or revisiting the page, special characters were changing to url encoded ones, like spaces were pluses. Fixed.
  • same scenario, multi-field experiments like find and replace weren't populating from localstorage properly. Fixed.
  • same scenario, the experiments that have "add More" buttons were only populating the first input. FIxed

Additionally, fixes #1939:
- currently, when text fields repopulate from localstorage on refresh or revisiting the page, special characters were changing to url encoded ones, like spaces were pluses. Fixed.
- same scenario, multi-field experiments like find and replace weren't populating from localstorage properly. Fixed.
- same scenario, the experiments that have "add More" buttons were only populating the first input. FIxed
@scottjehl scottjehl requested a review from stoyan November 9, 2022 21:48
Copy link
Contributor

@stoyan stoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! Few nits inline.

And don't forget to run composer format:prettier

}
});
}
var input = form.querySelector("textarea[name='" + keyval[0] + "']:not([data-hydrated='true']),input[type='text'][name='" + keyval[0] + "']:not([data-hydrated='true'])");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these queries will be more readable as templates

form.querySelector(`textarea[name='${keyval[0]}']:not([data-...`);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah maybe? I left them for now... we could revisit

@scottjehl scottjehl merged commit 951c51d into master Nov 10, 2022
@scottjehl scottjehl deleted the 1939 branch November 10, 2022 16:40
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.

repopulate script for experiments form can mess up freeform text encoding

3 participants