more sanity checking
This commit is contained in:
@@ -70,6 +70,13 @@ function booking_register_page()
|
|||||||
*/
|
*/
|
||||||
function _booking_ecclesia_name_autocomplete($string = "") {
|
function _booking_ecclesia_name_autocomplete($string = "") {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
|
|
||||||
|
if ($string === "") {
|
||||||
|
// Return empty result to the form in json
|
||||||
|
drupal_json_output($matches);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$sanitised_string = preg_replace("/[^a-zA-Z0-9\s\.']/", '', $string);
|
$sanitised_string = preg_replace("/[^a-zA-Z0-9\s\.']/", '', $string);
|
||||||
$sanitised_string .= "%";
|
$sanitised_string .= "%";
|
||||||
//watchdog('booking_debug', "<pre>Autocomplete checking for ecclesia matching:\n@info</pre>", array('@info' => print_r($sanitised_string, true)));
|
//watchdog('booking_debug', "<pre>Autocomplete checking for ecclesia matching:\n@info</pre>", array('@info' => print_r($sanitised_string, true)));
|
||||||
|
Reference in New Issue
Block a user