Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip slashes when saving features. #2753

Merged
merged 1 commit into from
May 12, 2022
Merged

Strip slashes when saving features. #2753

merged 1 commit into from
May 12, 2022

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented May 11, 2022

Description of the Change

Strips slashes from post data when saving settings. Not doing this was leading to double slashing when settings were saved to the database, which was particularly notable when using an attribute selector for Autosuggest.

Closes #2731

Alternate Designs

NA

Possible Drawbacks

NA

Verification Process

Go to ElasticPress > Features and save input[type="text"] as the Autosuggest Selector, then refresh the page. Previously the saved value would appear as input[type=\"text\"] and be double slashed as input[type=\\\"text\\\"] in the database. With this change it should show as it was entered, and only be single slashed in the database.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

  • Fixed - An issue where attribute selectors could not be used for the Autosuggest Selector.

Credits

Props @JakePT

@JakePT JakePT added this to the 4.2.0 milestone May 11, 2022
@JakePT JakePT requested a review from felipeelia May 11, 2022 09:27
@JakePT JakePT self-assigned this May 11, 2022
@felipeelia felipeelia merged commit f1ed382 into develop May 12, 2022
@felipeelia felipeelia deleted the fix/2731 branch May 12, 2022 14:12
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.

BUG: input[type="text] selector not working with autosuggest
2 participants