ucldc / public_interface

Calisphere public interface source code (UCLDC Project) master branch should match live site
https://calisphere.org/
2 stars 5 forks source link

Escape reserved chars for OpenSearch query_string query #364

Closed barbarahui closed 5 months ago

barbarahui commented 5 months ago

This PR adds a function called query_string_escape to utils. This new function replaces calisphere.facet_filter_type.solr_escape and calisphere.search_form.solr_escape, which were identical.

Note that it does not escape double quotes (") or asterisks (*), since we do allow users to make use of these reserved characters: https://calisphere.org/help/#2