Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
fix: do not escape query passed to frontend
Browse files Browse the repository at this point in the history
The query retrieved in the URL is potentially used as input value.
Escaping the HTML is not expected here as it makes the value unusable for that purpose.
In other places where used, the query is already escaped.

Closes: #734
  • Loading branch information
rayrutjes committed May 14, 2018
1 parent 4c5bafe commit e8ff424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-algolia-template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function load_algolia_config() {
'application_id' => $settings->get_application_id(),
'search_api_key' => $settings->get_search_api_key(),
'powered_by_enabled' => $settings->is_powered_by_enabled(),
'query' => isset( $_GET['s'] ) ? esc_html( $_GET['s'] ) : '',
'query' => isset( $_GET['s'] ) ? $_GET['s'] : '',
'autocomplete' => array(
'sources' => $autocomplete_config->get_config(),
'input_selector' => (string) apply_filters( 'algolia_autocomplete_input_selector', "input[name='s']:not('.no-autocomplete')" ),
Expand Down

0 comments on commit e8ff424

Please sign in to comment.