10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.23k stars 312 forks source link

BUG: The Autosuggest endpoint field in the settings accepts non-URL values #3927

Open burhandodhy opened 1 month ago

burhandodhy commented 1 month ago

Describe the bug

The Autosuggest endpoint field in the settings accepts non-URL values. When passing the value to JS, the plugin tries to escape the value, resulting in an empty string. Consequently, Autosuggest doesn't work and no error is thrown.

Steps to Reproduce

  1. Go to ElasticPress -> Autosuggest settings
  2. Enter invalid URL in the ENDPOINT URL

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct